::- @echo off&setlocal EnableDelayedExpansion
- title 检测ip
- :kai
- set num=0&set str=0
- for /f "tokens=1-3 delims= " %%a in (a.txt) do (
- ping/n 1 %%a>nul 2>nul
- if !ERRORLEVEL! neq 0 (
- for /f "delims=:" %%i in ('Rasdial %%a %%b %%c') do (
- if "%%i"=="若需此错误的详细说明" set str=1&echo %%a 连接出现错误
- )
- if !str! equ 0 call :lis %%a
- ) else echo %%a 在线
- )
- if !num! equ 0 (exit) else goto kai
- :lis
- ping/n 1 %1>nul 2>nul
- if !ERRORLEVEL! neq 0 goto lis
- Rasdial %1 /disconnect&&echo 以断开 %1 连接,正在检测其它的ip
- set num=1
- goto :eof
复制代码
|