网络问题
程序员文章站
2022-07-12 19:09:31
...
:begin
@echo off
echo checking ....
for /f "skip=7 tokens=2* delims=(%%" %%a in ('ping -n 2 IP') do (
echo %%a %% lost
if "%%a"=="100" goto lost
)
goto begin
:lost
ipconfig /release *大网*
ipconfig /renew *大网*
goto begin
@echo off
echo checking ....
for /f "skip=7 tokens=2* delims=(%%" %%a in ('ping -n 2 IP') do (
echo %%a %% lost
if "%%a"=="100" goto lost
)
goto begin
:lost
ipconfig /release *大网*
ipconfig /renew *大网*
goto begin