DOS - How to redirect errors to NULL

To run command, and send any output the program writes to stderr, to the NUL device, you would write:

command 2> NUL

> is the DOS output redirect operator.

2 is the numeric identifier for the standard error stream stderr.

For information, the other streams are:

0 = stdin (default device: keyboard)

1 = stdout (default device: console window)

2 = stderr (default device: console window)



Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath