@rem Este programa verfica se el host esta activo @echo off IF "%1"=="" GOTO Syntax >NUL @rem IF NOT EXIST %1 GOTO Syntax :Begin @echo Verificando el host %1 PING %1 -n 1 |find "TTL=" IF NOT ERRORLEVEL 1 GOTO Next :Next PING %1 -w 6000 |find "TTL=" >NUL IF ERRORLEVEL 1 GOTO Error @rem @echo No hay problemas, el %1 Esta bien GOTO End :Error ECHO Error pinging host %1 @Rem enviar msg de error y guardar log echo > Error de conexion con %1 las %time% c:\error_%1.txt echo. > c:\error_%1.txt net send localhost El Servidor %1 tiene problemas pause GOTO End :End @echo El Host %1 esta activo las: %time% Recheking... @rem Waiting to check again... PING 1.1.1.1 -n 8 -w 10000 >NUL cls GOTO Begin exit :Syntax @echo La sintaxis del comando no es correcta. @echo El argumento es checkhost