Using a batch script, I am tying to break out of an inner for loop and land on the outer for loop to carry on the sequence but it returns an error saying:
The syntax of the command is incorrect
It is referring to the my :breakerpoint label. Please advice. Thank you.
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