How to log execution of batch file to text file?
Posted on 2003-11-11
I have a batch file that executes various DOS commands and external
applications (e.g. SCP secure copy program). The batch file is executed on a
schedule by Windows 2000 Scheduled Tasks. I need to capture the output (that
I would see on the screen if I ran the batch file manually in a Command
Prompt) in a text file for troubleshooting purposes.
Here is a sample from the batch file:
SCP -q -pw XXXX sched_denmark.html firstname.lastname@example.org:/xxx/xxx/.
net use n: /d
net use n: \\xxx\wwwroot
copy sched_france.html n:\fr