- set/p IP="请输入ip:"
- >1.js echo var d=new Date();d.setTime(d.getTime()+10*1000);
- >>1.js echo var s=''+d.getSeconds();
- >>1.js echo WScript.echo(s);
- :1
- ping -n 1 -l 1 %IP%>>ip.txt
- if errorlevel 1 echo 网络已经断开
- for /f "skip=3" %%i in ('cscript 1.js') do set a=%%i
- goto 2
- :2
- set b=%time:~6,2%
- if %b%==%a% goto 1
- goto 2
复制代码
|