Created
September 4, 2018 09:38
-
-
Save mansouryaacoubi/3510128a2bef7d484152e0906644085e to your computer and use it in GitHub Desktop.
Check whether MY Servers are reachable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Checking active hosts | |
@echo off | |
color FC | |
:start | |
cls | |
echo Ping MYServer001... | |
ping -n 1 myserver001.yaacoubi.com | find "TTL=" >nul | |
if errorlevel 1 ( | |
echo HOST NOT REACHABLE | |
timeout 3 | |
) else ( | |
echo HOST REACHABLE | |
pause | |
) | |
echo. | |
echo Ping 001... | |
ping -n 1 001.yaacoubi.com | find "TTL=" >nul | |
if errorlevel 1 ( | |
timeout 3 | |
echo HOST NOT REACHABLE | |
) else ( | |
echo HOST REACHABLE | |
pause | |
) | |
echo. | |
echo Ping MYDynDNS001... | |
ping -n 1 mydyndns001.ddns.net | find "TTL=" >nul | |
if errorlevel 1 ( | |
echo HOST NOT REACHABLE | |
timeout 3 | |
) else ( | |
echo HOST REACHABLE | |
pause | |
) | |
goto start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment