I am able to run a simple batch file (thanks to here) which will ping an ip and if it is successful it will go to SUCCESS and if it fails it will go to FAILS.
However, this works for constant success or constant failure, I want it to point at an unsteady connection and only go to FAILS if more than 50% (so, >5) pings fail. Is there any way to do this?
@echo off
ECHO Checking connection, please wait...
PING -n 10 HOST_IP|find "Reply from" > NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS
IF ERRORLEVEL 1 goto :FAILS
:FAILS
Echo FAIL!
@echo off
:SUCCESS
Echo Success!
@echo off
Thanks