You are not logged in.
Pages: 1
Hi,
I have a batch script with the following logic:
robocopy.exe sourcedir destdir /R:0 /S /LOG:log.txt
IF %ERRORLEVEL% GEQ 8 (
// Email me
GOTO :EOF
)
However, when I look at the log file, it has the following:
2007/10/14 19:17:27 ERROR 112 (0x00000070) Copying File sourcedir\filename.ext
There is not enough space on the disk.
It skips this file and goes to the next file without e-mailing me.
What am I doing wrong? How do I get the script to e-mail me on ANY error?
Thanks!
Offline
I'm guessing it sets the errorlevel to something between 1 and 7 when the problem is disc space
Try testing it by adding an ECHO ERRORLEVEL is [%ERRORLEVEL%]
Offline
The value of errorlevel returned is 8. The issue is: It is returned after it reaches the last file. What I am trying to do is: E-mail when there is an error (on any file) and not on the last file.
Offline
Pages: 1