Ping to file with timestamps

@echo off

Set ip=192.168.0.100

:loop

For /f “delims-” %%a in (‘ping %ip% -n 1 -l 1024 ^| findstr “TTL out”‘ do echo %date% %time% – %%a >> nameOfFile.txt

Sleep 1

Goto :loop

Leave a Reply