1.

Solve : Batch file ping test how to export results ? ??

Answer»

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!


Discussion

No Comment Found