@echo off
set n=0
for /f "tokens=*" %%a in (a.txt) do (
set/a n+=1
call set #%n%#=%%a
)
set n=0
for /f "tokens=*" %%a in (b.txt) do (
set/a n+=1
call echo.%%#%n%#%%----%%a
)
@echo off
for /f "delims=" %%a in (a.txt) do (
call :lp "%%a"
)
pause&goto :eof
:lp
for /f "%skp% delims=" %%b in (b.txt) do (
set /a n+=1
call set skp=skip=%%n%%
echo.%~1---%%b
goto :eof
)
@echo off
set n=0
for /f "tokens=*" %%a in (a.txt) do (
set/a n+=1
call set #%%n%%#=%%a
)
set n=0
for /f "tokens=*" %%a in (b.txt) do (
set/a n+=1
call call echo.%%%%#%%n%%#%%%%----%%a
)
pause
'cscript -nologo a.vbs
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFileA = oFso.OpenTextFile("a.txt")
Set oFileB = oFso.OpenTextFile("b.txt")
While Not (oFileA.AtEndOfLine Or oFileB.AtEndOfLine)
WSH.Echo oFileA.ReadLine & "----" & oFileB.ReadLine
Wend
@echo off
for /f "skip=4 tokens=1,2 delims=" %%i in ('find /v /n "" ?.txt^|sort') do (
If Not defined textnewline%%i (
set/p=%%j---<nul
set textnewline%%i=%%i
) else (
echo %%j
)
)>>output.txt