將本目錄下的txt合併bat
將本目錄下的txt檔案中的內容都移動到一個新的txt文字里面 mergeTxt.bat
@echo off set outputFile=merged.txt del %outputFile% for %%f in (*.txt) do ( type "%%f" >> %outputFile% echo.>>%outputFile% echo.>>%outputFile% echo ____________________________________________________________>>%outputFile% )
在每個檔案結尾新增空行和下劃線行
echo.>>%outputFile% echo.>>%outputFile% echo ____________________________________________________________>>%outputFile%