ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Ping with Time Stamp

    IT Discussion
    1
    2
    358
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JoelJ
      Joel
      last edited by

      Hi Guys
      Does anyone know how to ping 8.8.8.8 -t with a time and date stamp? I know how to get this to a txt file ie: C:>ping google.com >> c:\Test.txt -t but how can i get this to show the actual time and date? any ideas would be welcomed. thanks

      1 Reply Last reply Reply Quote 0
      • JoelJ
        Joel
        last edited by

        Ignore that - i found this batch file which works well:

        @echo off
        echo >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:~0,2%:%time:~3,2%:%time:~6,2% %%A>>pinglog.txt && GOTO Ping)

        ##CASE CLOSED##

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post