我有一个批处理脚本,它调用了一系列批处理文件。
如果出现错误情况,我需要退出被调用的批处理文件以及父批处理文件。是否可能在子批处理文件中完成这个操作?
test.bat
rem Test1.bat will exit with error code.
call test1.bat
rem Want script to stop if test1.bat errors.
call test2.bat
test1.bat
rem Can I get test.bat to terminate from inside test1.bat?
exit /b 1