
CODE: [Copy to clipboard]@echo off & SetLocal EnableDelayedExpansion
for %%a in (1.txt 2.txt) do set /a num+=1&call :context %%a !num!
for /l %%a in (1,1,%maxline%) do (
set lineno=%%a
>>3.txt echo:[1]!file_1_%%a![2]!file_2_%%a![3]
)
echo 处理完成&pause & start notepad 3.txt&exit /b 0
:context
set line=0
for /f "delims=" %%a in (%1) do (
set /a line+=1
set file_%2_!line!=%%a
)
if not defined maxline set maxline=%line%
goto :EOF
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |