@echo off setlocal EnableExtensions set "FILE=%~1" if not defined FILE set "FILE=urls.txt" if not exist "%FILE%" ( echo File not found: %FILE% exit /b 1 ) where curl.exe >nul 2>nul if errorlevel 1 ( echo curl.exe not found. exit /b 1 ) echo Checking URLs from %FILE% for /f "usebackq eol=# tokens=*" %%U in ("%FILE%") do ( for /f %%S in ('curl.exe -sS -o NUL -L --max-time 15 -w "%%{http_code}" "%%U" 2^>nul') do ( echo %%S %%U ) ) endlocal