Documente Academic
Documente Profesional
Documente Cultură
Summary
When redirecting output from an application using the ">" symbol, error
messages still print to the screen. This is because error messages are often
sent to the Standard Error stream instead of the Standard Out stream.
EXAMPLE
The command "dir file.xxx" (where file.xxx does not exist) will display the
following output:
If you redirect the output to the NUL device using "dir file.xxx > nul", you will
still see the error message:
Or, you can redirect the output to one place, and the errors to another.
https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout 1/3
11/20/2017 Redirecting Error Messages from Command Prompt: STDERR/STDOUT
You can print the errors and standard output to a single file by using the "&1"
command to redirect the output for STDERR to STDOUT and then sending the
output from STDOUT to a file:
https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout 2/3
11/20/2017 Redirecting Error Messages from Command Prompt: STDERR/STDOUT
https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout 3/3