i ve seen pingers and auto redials when theres a request time out.
problem: but im having a hard time researching the counter or increment part.
idea: heres how it should be:
start pinging continuously while connected to internet, otherwise count (or accumulate) request time out until 1min or 60 request time out, if connection went back after request time out & less than 60 times request time out ,reset the request time out counter to zero if request time out reached 60x : run another batch or reconnect re-dial up. loop to internet connection pinging
the closest that i saw: (but for some reason its not working on my xp)
@echo off
setLocal EnableDelayedExpansion
:loop
ping -n 2 10.174.10.48 >> log
find /i "Reply" < log > nul
if not errorlevel 1 type nul > log & goto :loop
for /f "tokens=1" %%a in ( find /c /i "Request timed out" ^< log ) do (
if %%a geq 10 echo file.exe && type nul > log
)
goto :loop
source: http://www.computing.net/answers/programming/ping-bat-file/16605.html
credits to the original poster. thank you