The 'script' shows nothing related to putting information into results,txt

But I see that is done using redirection of output when the script is started?

So, perhaps put the copy commands in a subordinate cmd file and call that, with
the blat done after control returns from the called script - you will lose the
log details of the blat  process, but you can't have everything.

 

If you have not used it, have a look at tee.exe for redirection  

 

JimB 

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Jimmy Tran
Sent: Tuesday, September 30, 2014 3:48 PM
To: [email protected]
Subject: [NTSysADM] quick batch question

 

I have a scheduled task to run a batch script to copy files.  In task scheduler
I run the command c:\batch.bat > d:\results.txt. 

 

Example of c:\batch.bat

copy c:\file1 d:

copy c:\file2 d:

blat.exe d:\results.txt (smtp settings omitted)

 

This fails to email because I get an error about opening the d:\results.txt file
since it is use by task scheduler.

 

So my question is, what is the best way to email myself the logs for this batch
file?  I can't think of any other way to do this other than to have a separate
task to email reults.txt, which I want to stay away from.

 

TIA

 

Jimmy


Reply via email to