我有一個 file_list,其中保存來源檔案的路徑。
ex:
file_list
-c:\SAY\hello\world.txt
-c:\SAY\hello\New\file.txt
使用 for 循環我嘗試將其中的檔案複製file_list
到目的地
ex:
FOR /F "usebackq tokens=*" %%A in (file_list) DO (
xcopy /i/y "%%A" "D:\hi\hello\"
我想"c:\SAY\hello\New\file.txt"
複製"D:\hi\hello\New\file.txt"
\New\file.txt
在這裡我可以複製文件,但資料D:\hi\hello\
夾結構不一樣。D:\hi\hello\New\