
【已解決】批處理type中循環語句如何表示D:DATA文件夾中有500個文本,分別命名為1.txt 2.txt...500.txt欲1.txt 與 2.txt合并,3.txt 與 4.txt合并......499.txt 與 500.txt合并type D:DATA1.txt > D:DATA21.txttype D:DATA2.txt >> D:DATA21.txttype D:DATA3.txt > D:DATA22.txttype D:DATA4.txt >> D:DATA22.txt......type D:DATA499.txt > D:DATA2250.txttype D:DATA500.txt >> D:DATA2250.txt@echo offsetlocal enabledelayedexpansionfor /l %%f in (1,1,250) do (set q=%%ftype D:DATA!q!*2-1.txt > D:DATA2!q!.txttype D:DATA!q!*2.txt >> D:DATA2!q!.txt)endlocalexit上述代碼標紅處,如何正確表示?

