纯p 处理文本文件不是强项,下面代码勉强可用,效率应当不是太好。bat文件保存为ANSI编码,要处理的文本最好也是ANSI编码:- @echo off
- set n=0
- setlocal enabledelayedexpansion
- (for /f "delims=" %%i in (33.txt) do (
- if !n! equ 1 echo,%%i
- set "str=%%i"
- if not "!str:>楼主=!"=="!str!" (set n=1) else set n=0
- ))>44.txt
- pause
复制代码
|