gisjun 当前离线
列兵
CrLf 当前离线
论坛巡查
@echo off findstr /n .* b.txt>tmp1 find /n /v "" a.txt|more>tmp2 +2 (for /f "skip=1 tokens=2*delims=]:" %%a in ('fc /lb1000 /n tmp1 tmp2^|sort') do echo;%%b)>合并.txt del /q tmp? pause复制代码
TOP
tmplinshi 当前离线
版主
@echo off >合并.txt ( type b.txt more +1 a.txt )复制代码
@echo off set .1= (for /f "delims=" %%a in (' dir /a:-d /o:n /b *.txt ') do ( if not defined .1 ( type "%%a" set .1=d ) else ( more +1 "%%a" ) )) >_合并.txt复制代码
@echo off copy a.txt a.bak ren a.txt 合并.tmp more +1 *.txt>>合并.tmp ren a.bak a.txt复制代码