Guest User

Untitled

a guest
Jun 17th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. @echo off
  2.  
  3. set/p host=host Address:
  4. set logfile=Log_%host%.log
  5.  
  6. echo Target Host = %host% >%logfile%
  7. for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
  8. :Ping
  9. for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
  10. echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
  11. echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
  12. timeout 1 >NUL
  13. GOTO Ping)
Advertisement
Add Comment
Please, Sign In to add comment