Batch Errors write to .txt

August 4, 2010 at 08:38:46
Specs: Windows 7, Quad Core i7, 12gb ram
Hi,

I have a script that runs through and when it hits an error runs past it and then closes after all the script has been run this means we dont get to see any errors that may occur.

is it possible to have it write all errors to a text file? and maybe date the errors.

for example if it trys to upload a file and gets "permission denied on file *******.filetype" it would then write that error with a date to errors.txt

Simon


See More: Batch Errors write to .txt

Report •


#1
August 4, 2010 at 09:17:54
I suppose it's a ftp script.

my.bat > log


=====================================
Helping others achieve escape felicity

M2


Report •

#2
August 5, 2010 at 01:00:23
Hi M2,

I have seen this mentioned else where on the thread however it would have to run directly inside the batch and not on another batch file linking to it. how could I do that? would I have to put:

> log.txt

after every line of the batch?


Report •

#3
August 5, 2010 at 01:01:25
Also I only wont the errors to my wrote to the log file not the entire scripts echos

Report •

Related Solutions

#4
August 5, 2010 at 01:28:39
Do you have one batch calling or running another?


=====================================
Helping others achieve escape felicity

M2


Report •

#5
August 5, 2010 at 01:44:53
no you must manually double click the .bat to have it run.

Report •

#6
August 5, 2010 at 02:02:55
Solved I have written the entire batch into an external file that is run with a write command thanks for the help M2

Report •


Ask Question