Share via


Redirecting scheduled task output to a file.

Scheduled task is very helpful, the problem that I had, I was unable to get the output of the batch process that was executed by the scheduled task.

I tried to redirect the output using > as follow:

Batchfile > C:\Batch_Result.txt

and nothing happened. I do not know why.

The solution was actually very simple, use >> instead of >

Batchfile >> C:\Batch_Result.txt

It works great, even better, whenever the scheduled task is executing the batch file, the result is appended at the end of the text file instead of rewriting it. I simply added a simple date /t command, and I know exactly my scheduled task result at any given day.

Comments

  • Anonymous
    July 02, 2011
    I know I'm five years late, but this is exactly what I'm looking for. Thank you.

  • Anonymous
    August 09, 2011
    The comment has been removed