4
使用批处理脚本,我正在打破内部for循环,并在外部for循环进行序列,但它返回一个错误说:无法跳出For循环到另一个For循环
The syntax of the command is incorrect
它指的是我的:断点标签。请指教。谢谢。
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
相关:[.BAT突破多个嵌套循环,完成各自的列表后(http://stackoverflow.com/a/37041525) – aschipfl