Using Windows Server 2008, how do I go about capturing the output of a script that is being ran with the windows task scheduler?
I\'m testing a rather long custom pr
You can write to a log file on the lines that you want to output like this:
@echo off
echo Debugging started >C:\logfile.txt
echo More stuff
echo Debugging stuff >>C:\logfile.txt
echo Hope this helps! >>C:\logfile.txt
This way you can choose which commands to output if you don't want to trawl through everything, just get what you need to see. The > will output it to the file specified (creating the file if it doesn't exist and overwriting it if it does). The >> will append to the file specified (creating the file if it doesn't exist but appending to the contents if it does).