for or with jump labels in batchchoice /c mws.curl -s -o /dev/null -w "%{http_code}" https://www.google.com/choice /c mwscurl -s -o /dev/null -w "%{http_code}" https://www.google.com/:loop
rem do something...
goto loopchoice /c:AB /n > nul 2>&1@echo off
set /p link="Enter URL: "
for /f %%i in ('curl -s -o /dev/null -w "%%{http_code}" %link%') do set RES=%%i
echo status code : %RES%
if "%RES%" neq "200" (
echo error
) else (
echo success
)
pause