好用的批处理命令

ping一个网段并将通的ip和不通的ip分别写入不同的txt文件

for /l %D in (1,1,255) do ((ping 192.168.8.%D -n 1 | find "TTL=" > NUL) && echo 192.168.8.%D>>ok.txt || echo 192.168.8.%D >>no.txt)

 

posted on 2023-07-21 00:29  Arthurian  阅读(20)  评论(0编辑  收藏  举报