//pingSingleIp

;;
@Echo off
@for /f "tokens=1-4 delims=." %%i in (ip.txt) do (@ping -w 600 -n 1 %%i.%%j.%%k.%%l|find /i "超时" &&( date /t >>%%i.%%j.%%k.%%l.txt & echo %time:~0,-3% >>%%i.%%j.%%k.%%l.txt & echo %%i.%%j.%%k.%%l Timed Out >> %%i.%%j.%%k.%%l.txt & echo off))
echo.&echo 扫描完毕,按任意键退出...&pause>nul

 

//pingIpSegments

;;
@Echo off
@for /f "tokens=1-4 delims=." %%i in (ip.txt) do (@for /l %%n in (1,1,5) do @ping -w 600 -n 1 %%i.%%j.%%k.%%n|find /i "超时" &&(date /t >>%%i.%%j.%%k.%%n.txt & echo %time:~0,-3% >>%%i.%%j.%%k.%%n.txt & echo %%i.%%j.%%k.%%n Timed Out >> %%i.%%j.%%k.%%n.txt & echo off))
echo.&echo 扫描完毕,按任意键退出...&pause>nul

posted on 2014-12-01 14:43  叶城宇  阅读(855)  评论(0编辑  收藏  举报