Ping w/ Date Stamp

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
 
J

John Phillips

Try this in a batch file:

:START
date/t && time/t && ping -n 10.51.6.2
goto START

and then execute it like this:
c:\> mybatchfile.bat > logfile.txt

Of course, this will fill up your logfile pretty quickly, so you'll have to
insert a pause somehow just before the "goto START" line. My suggestion
would be to write a small program which calls the Win32 Sleep() function (or
find someone who's already done it).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ping w/ Date Stamp 1
Excel Excel 2010 Time Stamp Button Help 1
Ping Program 1
Time/Date Stamp 3
update time stamp / date modified 3
date stamp 1
Now pinging isn't ever right XP to Vista 4
Date & Time Stamp 2

Top