CMD
SET "WAITFORHOSTONLINE=HOSTNAME_OR_IP" :CHECK_NETWORK ECHO Check: If network (host: %WAITFORHOSTONLINE%) online ping %WAITFORHOSTONLINE% -l 1 -n 1 | FIND /I "ttl" > nul IF %ERRORLEVEL% equ 1 ( TIMEOUT /T 3 /NOBREAK CLS GOTO CHECK_NETWORK ) ECHO HOST ONLINE