Last active
May 21, 2024 13:48
-
-
Save JBlond/cee8446f280f12bcff7a2b7b6da3d587 to your computer and use it in GitHub Desktop.
is online bach windows / pingable
This file contains hidden or 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
@echo off | |
IF "%~1" == "" GOTO noinput | |
@ping -n 1 %1 | find "TTL" | |
if ERRORLEVEL 1 ( | |
echo offline | |
) else ( | |
echo okay | |
) | |
GOTO end | |
:noinput | |
echo NO input given | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment