- @echo off&setlocal enabledelayedexpansion
- for %%i in (*.txt) do (
- for /f "delims=:" %%a in ('findstr /n "详细说明:" "%%~i"') do set n=%%a&set nn=
- for /f "tokens=1* delims=:" %%a in ('type "%%~i" ^| findstr /n .*^&del /s/q "%%~i"') do (
- if %%a leq !n! (echo,%%b>>"%%~i") else (set nn=!nn!%%b)
- )
- echo,!nn!>>"%%~i"
- )
- set /p=处理完毕
复制代码
|