【发布时间】:2016-08-22 15:24:39
【问题描述】:
使用批处理脚本,我想跳出内部 for 循环并降落在外部 for 循环上以继续执行该序列,但它返回错误提示:
The syntax of the command is incorrect
它指的是我的 :breakerpoint 标签。请指教。谢谢你。
for /l %%A in (1, 1, %NumRuns%) do (
echo Doing run %%A of %NumRuns%
for /l %%B in (1, 1, 3) do (
ping 127.0.0.1 -n 2 > NUL
tasklist /FI "IMAGENAME eq Reel.exe" 2>NUL | find /I /N "Reel.exe">NUL
echo innerloop top
echo Error lvl is %ERRORLEVEL%
if NOT "%ERRORLEVEL%"=="0" (
echo innerloop middle
goto:breakerpoint
)
echo innerloop bottom
)
taskkill /F /IM "Reel.exe"
:breakerpoint rem this is error line
)
:end
echo end of run
pause
【问题讨论】:
标签: batch-file