
CODE: [Copy to clipboard][ Last edited by senffon on 2010-5-9 at 13:41 ]setlocal EnableDelayedExpansion
@mode con cols=80 lines=25
@color 0b
@echo off
:loop
set ip=qq.com
set ip2=114la.com
set ip3=hao123.com
call :sping %ip%
call :sping %ip2%
call :sping %ip3%
goto loop
:sping
title 检测到 %1 连接信息
echo.=========================================================================
ping -n 1 %1 |find /i "TTL"
if %errorlevel% == 0 (echo.在【%date% %time%】时测试到 %1 网络是连通的) else (
echo. 在【%date% %time%】时测试到 %1 网络不通>>lost.log)
CODE: [Copy to clipboard]@mode con cols=80 lines=25
@color 0b
@echo off
setlocal EnableDelayedExpansion
:loop
for /f %%a in (hostip.txt) do (
set ipadd=%%a
title 检测到 !ipadd! 连接信息
echo. 在时间:%date% %time:~0,5% 测试到 !ipadd!:
ping -n 1 !ipadd!|find /i "TTL"
echo.=============================================================================
if %errorlevel% == 1 echo. 在【%date% %time%】时测试到 !ipadd! 网络不通>>lost.log
)
goto loop
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |