Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file ping test how to export results ? ?  (Read 25439 times)

0 Members and 1 Guest are viewing this topic.

DeltaSlaya



    Apprentice
  • Google
    Re: Batch file ping test how to export results ? ?
    « Reply #15 on: August 21, 2007, 05:14:48 AM »
    Quote
    @echo off

    :begin
    if exist "ips-to-ping.txt" echo File already exists, continue? & pause

    :: Start making IPs to ping.
    ::
    :: FORMAT:
    :: >>"ips-to-ping.txt" echo assetname:IP address

    >"ips-to-ping.txt" echo Faulty:19.456.789.1
    >>"ips-to-ping.txt" echo Tallagh:19.456.789.3
    >>"ips-to-ping.txt" echo Faulty 2:19.456.789.2
    >>"ips-to-ping.txt" echo Nass:19.456.789.4

    ::start pinging
    :ping
    for /f "usebackq tokens=1,2 delims=:" %%a in ("ips-to-ping.txt") do (
    ping %%b >nul || echo %%a:%%b Timed Out @ %date%:%time%>> "pingfailed.log"
    )

    ::done
    :end
    echo Done.
    pause

    That should work! :P
    System specs:
    Intel Core 2 Duo E6600 (up to 3.3 stock V and air)
    ASUS Striker Extreme
    XFX 8600GT XXX Edition
    2x 1gB Corsair XMS2 DDR2-800
    Seagate Barracuda 320gB SATA
    Raidmax Ninja 918 (520W ATXV2.0 PSU)
    -