1
連接兩個文本文件時遇到一些困難。 第一個文本文件批處理文件 - 連接兩個.txt文件到一個
Document1
Document2
Document3
第二個文本文件
456
233
100
我想知道的是如何將它們串聯在另一個文本文件中,以便使他們能夠看到這樣
Document1-456
Document2-233
Document3-100
我有這個代碼,但它不工作,因爲我想要
@echo off
Set f1=file1.txt
set f2=file2.txt
FOR /F "Delims=" %%A in ('TYPE %f1%') DO (
FOR /F "Delims=" %%B in ('TYPE %f2%') DO (
echo.%%A-%%B >>newfile.txt
)
)
我希望你能幫助我