Computing.Net > Forums > Disk Operating System > quit the batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

quit the batch file

Reply to Message Icon

Name: Tunu
Date: August 21, 2003 at 08:41:22 Pacific
OS: win nt
CPU/Ram: intel III
Comment:

Hi All,

I am running the vbs files through the batch file. I am trying to exit the batch file without running rest of the program if there is any error occurs in the one of the vbs files. I am confused about errorlevel since when I comment out some of the codes in one the vbs files , it doesn't quit the batch file and it gives errorlevel = 0. My understanding was that if the program runs successfully, errorlevel must be "0".

If you help me how can I quit the batch file when the any kind of error occurs in the one of the vbs files, I really appreciate.
My batch file looks like:

------------
@ echo off
cscript ../script_files/FrontPage.vbs
cscript ../script_files/FrontTimeStmpUpdt.vbs
----------
Thank you...




Sponsored Link
Ads by Google

Response Number 1
Name: Ricky
Date: August 22, 2003 at 08:37:50 Pacific
Reply:

You have to test after every execution.

:BEGIN
cscript ../script_files/FrontPage.vbs
IF ERRORLEVEL 1 GOTO END
cscript ../script_files/FrontTimeStmpUpdt.vbs
IF ERRORLEVEL 1 GOTO END


:END


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: quit the batch file

closing the batch file www.computing.net/answers/dos/closing-the-batch-file/13210.html

Keep Running the Batch file after overwritten www.computing.net/answers/dos/keep-running-the-batch-file-after-overwritten/16910.html

DOS Batch file to FTP files from UNIX www.computing.net/answers/dos/dos-batch-file-to-ftp-files-from-unix/2105.html