Link to home
Start Free TrialLog in
Avatar of felixcw
felixcw

asked on

Continuous Ping with Timestamp - Windows 2003

Hi Experts exchange

The below code has worked nicely for me on our 2008+ servers

In windows 2003 however it doesn't show any info after the time and date? just a little rectangle

Anyone help me create the same thing but working in windows 2003?

@echo off
del pinglog.txt
for /f "tokens=*" %%A in ('ping 127.0.0.1 -n 1 ') do (echo %%A>>pinglog.txt && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping 127.0.0.1 -n 1 ') do (echo %date% %time% %%A>>pinglog.txt && GOTO Ping)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of felixcw
felixcw

ASKER

Thanks for speedy perfect response, solution fixed our issue