0
顯然這個批處理文件應該返回給定爲自變量的輸入文件並置,但它不工作:串聯Windows Shell中不工作
mybatchfile.bat example1.txt example2.txt
的:
set files=
for %%i in (%1 %2 %3 %4 %5 %6 %7 %8) do (
echo %%i
set files=%files% %%i
)
echo "the file list is %files%"
時調用預期結果應該是:
example1.txt
example2.txt
the file list is example1.txt example2.txt
但在最後一行中只有「example2.txt」。任何想法???
延遲擴展。 [This](http://stackoverflow.com/a/30177832/2861476)應該有幫助 –
好的,謝謝!現在它正在工作 –
你知道'%*'嗎? (會給你完整的參數列表,只需要'echo%*') – Stephan