@echo off
set filePath=D:\ping\1.txt
set ping_url=192.168.1.40
set ping_url1=192.168.1.26
set ping_url2=192.168.1.27
set ping_url3=192.168.1.29
set ping_url4=192.168.1.30
set sleep_times=300
:top
echo starting test network
echo %date% %time%>>%filepath%
ping %ping_url% -n 1|findStr "TTL" >> %filePath%
ping %ping_url1% -n 1|findStr "TTL" >> %filePath%
ping %ping_url2% -n 1|findStr "TTL" >> %filePath%
ping %ping_url3% -n 1|findStr "TTL" >> %filePath%
ping %ping_url4% -n 1|findStr "TTL" >> %filePath%
ping -n %sleep_times% 127.1 >nul
goto top
似乎不行啊 显示请按任意键继续。。
本回答被提问者采纳