keshun 当前离线
六级士官
评分人数
tmplinshi 当前离线
版主
@echo off setlocal enabledelayedexpansion for /f "delims==" %%i in (' "set # 2>nul" ') do set %%i= for /f "tokens=4 delims==" %%i in (a.txt) do ( set n=%%i set #!n:~0,4!=# ) (for /f "delims=#=" %%i in (' set # ') do echo %%i) >b.txt复制代码
TOP
caruko 当前离线
中校
for /f "delims=" %%i in (a.txt) do ( set "str=%%i" for /f "tokens=2 delims=#" %%a in ("!str: ip=#!") do ( set "num=%%a" set #!num:~1,4!=# ) )复制代码
@echo off setlocal enabledelayedexpansion for /f "delims==" %%i in (' "set # 2>nul" ') do set %%i= for /f "tokens=*" %%i in (a.txt) do ( set str=%%i set str=!str:* ip=! set #!str:~1,4!=# ) (for /f "delims=#=" %%i in (' set # ') do echo %%i) >b.txt复制代码