windows 批处理ping ip

//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

windows 批处理ping ip

上一篇:如何在windows server 2008的桌面上显示 我的电脑


下一篇:vscode标记“&&”不是此版本中的有效语句分隔符