29 January 2008

DOS - output error to log file

When you send the output of a DOS command to a text file it doesnt normally put any error messages there as well. The following method does.

e.g.
copy f1 f2 > log.txt 2>&1

No comments: