hello guys my goal is i want to ping a node over a network or a site every ping trys i need to save with a timestamp to a txtfile
by using these code in cmd "ping 10.80.1.126 -t >>D:\ping\ping.txt "
i get these "Reply from 10.80.1.126: bytes=32 time<1ms TTL=125"
by using these code in bat file =
setlocal enabledelayedexpansion
set hostIP=192.168.56.129
:loop
set pingline=1
for /f "delims=" %%A in ('ping -n 1 -w 250 -l 255 %hostIP%') do (
if
!pingline! equ 2 (
set
logline=!date! !time! "%%A"
echo
!logline! | find "TTL=">nul || (
set
logline=!logline:"=!
echo
!logline! >> pinglog.txt
)
)
set
/a pingline+=1
)
sleep -m 5000
goto loop
i get these "Thu 11/21/2013 13:57:27.87 Pinging 10.80.1.126 with 255 bytes of data:"
i always get these i dont know if it has "requested time out"
by the way im using windows xp thanks and god bless
auwi