::执行效果
1 @echo off 2 3 ::等待用户输入需要监控IP 4 set /p ip=Input the IP required to monitor: 5 echo executing...... 6 :start 7 echo|set /p ="!" 8 9 ::将时间插入到日志文件10 echo %date% %time% >>%ip%_log.txt11 ::findstr "Reply Request", 服务器端12 ::find "来自", PC机端13 14 ::测试结果插入到日志文件15 ping -n 1 %ip% | find "来自" >>%ip%_log.txt16 17 ::调节结果输出的频率18 ping 127.0.0.1 -n 4 >nul19 goto start20 pause
::日志文件内容
人爱美,不仅需要服饰居室之美,还需要心灵品德之美。