- @echo off & setlocal enabledelayedexpansion
- set as=0
- :a
- ping /n 1 127.0.0.1>nul
- for /f "tokens=1-4 delims=." %%a in (100.txt) do (
- set s=%%c
- )
- echo %s%
- ping /n 3 127.0.0.1>nul
- ping 223.252.201.130 -n 2 -l 1
- if errorlevel 1 (goto b) else (goto a)
- :b
-
- ping /n 1 127.0.0.1>nul
-
- set /a as+=1
- echo %as% > 掉线次数.txt
-
- goto a
- pause
- exit
复制代码
|