windows - exit a batch script that called another batch script -
I have a batch script which is called a sequence of batch files.
There is an error case, I need to get out of the batch file that was called, as well as a parent batch file. Is it possible to complete this child in a batch file? Thanks in advance for all tips / help.
test.bat
Rim test 1.Bat will exit the error code. Call test1.bat rem to stop test1.bat errors to stop the script. Call test2.bat test1.bat
can I get test.bat to end the test test from test.bat inside? Exit / B1
You can use the error level if the call batches Notify you to use exit 0 systematically continue and exit 1 to call the caller to stop, you call the caller Modify that way: Rim test 1.The batch will exit the error code. Call test1.bat rem to stop test1.bat errors to stop the script. If Error Level 1 Goto Fatal Call test2.bat Exhaust 0: Fatal Echo Fatal error exit 1
Comments
Post a Comment