开发者

print exit code in cmd in windows os [duplicate]

This question already has answers here: How do I get the application exit code from a Windows command line? 开发者_开发百科 (7 answers) Closed 9 years ago.

print exit code in cmd in windows os ....some command return exit code ...where this code store...and i want to print this exit code and assign it to variable


You can use %ERRORLEVEL% environment variable, it will hold the last code that was returned. You can echo it or assign it to a variable, depending on your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜