Ping w/ Date Stamp

  • Thread starter Thread starter Julian
  • Start date Start date
J

Julian

Can someone help me with this?

I need to know how to ping an IP and append/prepend a date/time stamp to the
result and then log to a file. I need to do this ping forever until I stop
the process.

I have been searching the net and found several batch files for this, but
none work?

Thanks
 
Julian said:
Can someone help me with this?

I need to know how to ping an IP and append/prepend a date/time stamp to the
result and then log to a file. I need to do this ping forever until I stop
the process.

I have been searching the net and found several batch files for this, but
none work?

Thanks

In the absence of any more detailed specification, I propose
this batch file. It will generate a ping about once every minute.

@echo off
:again
echo %date% %time% >> c:\PingLog.txt
ping 192.168.1.101 -n 1 | find /i "bytes=" >> c:\PingLog.txt
ping Localhost -n 58
goto again
 
Back
Top