11

我想通过 xcopy 一次复制多个文件。可能吗。我的意思是:
xcopy file1+file2+file3 destinationfolder
任何帮助表示赞赏:)

4

4 回答 4

12

我认为单个 xcopy 不可能,但您可以使用 for 语句。
类似于:
for %f in (file1, file2, filen) do xcopy %f dest\

于 2010-04-08T06:14:07.417 回答
3

对于 (file1,file2,file3) 中的 %f 执行 xcopy %f 目标文件夹

于 2010-04-08T06:15:19.950 回答
1

如果您的文件以特定模式开头,您可以使用通配符(例如以 file 开头的文本文件)

copy file*.txt e:\destination
于 2010-04-08T06:12:06.890 回答
1

I used the following for copying hundreds of files and filtering them by file extension. Below I am saying give me all files with the file extension .dll, .exe, or .pdf

for %f in (dll,exe,pdf) do xcopy /s /i C:\source\*.%f C:\destination
于 2017-09-08T18:49:09.450 回答