Created
July 24, 2017 07:29
-
-
Save digitalhuman/d54fac48339b3c2165e0aecab3eec43f to your computer and use it in GitHub Desktop.
0% package loss check in batch
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
@echo off | |
color 0A | |
ping -4 www.google.com -n 1 | find /I /N "0%% loss" > pingresult.txt | |
SET /P PingTest= < pingresult.txt | |
echo %PingTest% | |
(echo %PingTest% | findstr /i /c:"0%% loss" >nul) && (echo Variable contains the string "0%% loss") || (echo Variable does not have the string "0%% loss") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment