【发布时间】:2014-02-06 21:14:39
【问题描述】:
我正在运行以下 Windows .bat 脚本,但遇到了问题。
@echo off
set /p Var1= Drag and drop your .itmsp folder here:
CALL C:\progra~2\itms\iTMSTransporter -m verify -f %Var1% -u username -p password -o %Var1%\log.txt -s shortname -v eXtreme WONoPause true
IF %ERRORLEVEL% == 0 goto PASS
else goto FAIL
:PASS
blat c:\temp\file.txt -to user@example.com -subject "This has passed"
exit
:FAIL
blat c:\temp\file.txt -to user@example.com -subject "This has failed"
exit
命令运行但 ERRORLEVEL 似乎不起作用,只报告 0,没有别的。请问有什么建议吗?
【问题讨论】:
-
这里有更新。错误级别没有重新调整 0 以外的任何内容
-
抱歉,更改了问题以反映我现在的位置。
标签: batch-file batch-processing errorlevel