@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%i in (%*) do (
set /a n+=1
set !n!line=%%i
if !n! equ 2 (
echo !1line! !2line!>>result.txt
set /a n=0
)
)
endlocal
可以依次类推把每n行合并成一行。
[ Last edited by wydos on 2006-12-11 at 01:58 AM ]
setlocal enabledelayedexpansion
for /f "tokens=*" %%i in (%*) do (
set /a n+=1
set !n!line=%%i
if !n! equ 2 (
echo !1line! !2line!>>result.txt
set /a n=0
)
)
endlocal
可以依次类推把每n行合并成一行。
[ Last edited by wydos on 2006-12-11 at 01:58 AM ]

