本帖最后由 happyxxdhaha 于 2019-2-22 21:19 编辑
- @echo off&setlocal
- :loop
- set num=
- >nul ping 127.1 -n 2
- for /f "tokens=7 delims== " %%i in ('ping 114.114.114.114 -n 1^|findstr TTL') do echo %%i&set num=%%i
- if not defined num goto:end
- if %num:ms=% leq 100 (goto:loop) else (goto:next)
-
- :next
- set/p=延迟超过100,<nul&pause&goto:eof
-
- :end
- set/p=请求超时,<nul&pause&goto:eof
复制代码
|