After publishing the previous blog post, we have received a message with the script that lets one avoid printing all the details of pinging many IP addresses and saying which of them are available instead. It is really a handy and useful script and we decided to share it with the readers of our blog.
@echo off
for /l %%i in (1,1,255) do (
ping -n 1 192.168.1.%%i | findstr "TTL=" 1>nul && (
echo 192.168.1.%%i is UP
) || (
echo 192.168.1.%%i is DOWN
)
)
@echo off
for /l %%i in (1,1,255) do (
ping -n 1 192.168.1.%%i | findstr "TTL=" 1>nul && (
echo 192.168.1.%%i is UP
) || (
echo 192.168.1.%%i is DOWN
)
)
very similar to mine, but you can choose any ip address, and it's one line :)
ReplyDelete@echo off & For /L %%i in (%4,1,255) do @ping -n 1 %1.%2.%3.%%i | find "Received = 0" >nul & if errorlevel 1 @echo %1.%2.%3.%%i
Thank you for your suggestion, it's really simple and useful script.
ReplyDelete