Home > other >  Ping batch problem
Ping batch problem

Time:11-27

Now want to realize ping batch of IP. TXT in IP ping test, there should be sound the alarm when the network impassability, but cannot be achieved, help you a great god,

@ echo off
Set the date: the date=% % % ~ 0, 4 - date: ~ 5, 2 - % % date: ~ % % time: 8, 2 ~ 0, 8 %
Echo date % % network impassability & gt;> ErrorLog. TXT
FOR/F "delims=" % % I in (IP. TXT) do (
Ping I - n % % 1 | findstr searches "TTL" & gt; Nul& & Echo % % I network normal | | (echo % % I network not through
Echo
Mshta vbscript: createobject (" sapi. Spvoice ") speak (" command execution failed!" ) (window. Close)
Echo % % i> ErrorLog. TXT))
pause
  • Related