2010-03-26 54 views

回答

55
echo %ERRORLEVEL% 

從的TechNet,Command shell overview「%ERRORLEVEL%...返回最近使用命令的錯誤代碼的非零值通常表示錯誤。」

要測試批處理文件中的特定錯誤級別,您可能會發現this knowledgebase article有用。