Wednesday, October 5, 2011

DOS batch file stderr redirection

I never remember the whether the syntax of DOS file redirection is similar to normal Unix file redirection. It is. So I'm writing it down where I can find it.

CALL .\somescript.bat >> logfile.log 2>&1

Of note, I recently learned that redirecting output from a PowerShell script does NOT work very well and gives file handle errors. That's another story, entirely.

No comments:

Post a Comment