
批處理怎樣把掉線次數(shù)加上時(shí)間依次寫在TXT中最好附帶IP
nclick="copycode($('code0'));">復(fù)制代碼
- @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% > 掉線次數(shù).txt
- goto a
- pause
- exit

