1.

Solve : Is there any command to check if the batch file has completed successfully??

Answer»

I am a beginner to MS DOS batch file programming.

I have few batch files running EVERY night. I need to send an email to people giving the report generated by the batch file. The email should be sent only after the batch file is completed successfully and have generated a successful log file in a particular directory.
I send an email attaching that log file.

How should i check whether the batch file is completed successfully?

Thanks in advance.i dont know how to check if batch has completed successfuly but here is idea

if you use
CODE: [Select]dir C:\the %ERRORLEVEL% would be set to 0 (successful)
Code: [Select]dir XXX:\the %errorlevel% would be set to 1 (not successful)&&call batchfile.bat && PerformTask



Discussion

No Comment Found