Log batch file messages

August 5, 2010 at 11:16:46
Specs: Windows XP
Need an example of how to log the messages seen from the DOS prompt, when executing the batch file.

See More: Log batch file messages

Report •


#1
August 5, 2010 at 18:11:36
Alrighty,

ECHO Hello>test.txt

Will echo the word "hello" into the file test.txt

COPY example.txt %userprofile%\desktop>>test.txt

will echo "1 file(s) copied" into test.txt

See where I'm going?

Notice the difference between ">" and ">>". > deletes the contents of the file and places the new contents on the first line. >> keeps the contents of the file and places the new text on the last line.


Report •
Related Solutions


Ask Question