根据apang的思路来一个支持多TXT文本的
- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /a-d /b /s *.txt') do (
- for /f "tokens=1,5,6 delims= " %%i in (%%a) do (
- if defined flag (
- if /i %%i equ avge set "flag=" & echo "%%~nxa" --- !str!
- set str=%%k
- )
- if /i "%%j %%k"=="adjusted data" set flag=1
- )
- )
- pause
复制代码
|