windows批处理脚本bat命令解析【7】EXIT /B 0

exit命令: exit /B 返回值

例: aa.bat

---------------------------------------------------------------------------------

@echo aa.bat 调用中

@exit /b 2

---------------------------------------------------------------------------------

 

bb.bat

---------------------------------------------------------------------------------

@echo 调用aa.bat

@call aa.bat

@echo aa.bat的返回值:%errorlevel%

@pause

你可能感兴趣的:(windows)