Supress Responses From Commands In Batch Files

Posted December 6, 2003 by AlexTheBeast in Batch file programming

This quick recipe describes how to supress responses to commands within batch files.


During the execution of your batch files, users can see your commands on the screen. Most of the time this is good for debugging purposes; however, often it’s better to run your batch file silently.

Any command that is followed by “> nul” will not be shown on the screen. The greater sign directs the output to null (nowhere).

For example, copy *.* *.bak will show you as it copies all the files in the directory and renames them with the bak extension.

copy *.* *.bak > nul will silently complete its work without placing anything on the screen.

The Conversation

Follow the reactions below and share your own thoughts.