[ACCEPTED]-How to capture stderr on Windows/DOS?-stderr
Accepted answer
For example:
PSKILL NOTEPAD >output.txt 2>&1
This will direct stdout and 2 stderr to a file name output.txt.
See Underused features of Windows batch files for 1 more details.
That should work in Win32, too.
If you have 5 already redirected stdout, and want stderr 4 redirected to the same file, you must use 3 the 2>& special form, rather than just 2 specifying the same file twice. Otherwise 1 you'll get a "file busy" error.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.