- @echo off
- :loop
- cls
- set IP1=192.168.15.92
- set IP2=192.168.10.93
- set IP3=192.168.163.2
- for %%i in (%IP1% %IP2% %IP3%) do (
- ping -n 2 %%i|findstr "TTL=" >nul &&echo,ping %%i 成功||>>"error.txt" echo,%date:~,10% %time:~,8% ping %%i 失败
- )
- for /l %%z in (60,-1,0) do (
- cls
- echo 倒数%%z秒后将再次ping!请稍等。。。
- ping 0 -n 2 >nul
- )
- goto loop
复制代码
|