Wednesday, August 5, 2009

How to redirect stdout and stderr in windows

Basic redirection of stdout:

somecmd.exe > outfile

To redirect stderr to the same file, just redirect stderr to stdout:

somecmd.exe > outfile 2>&1

No comments: