Question

i want to copy multiple files at once through xcopy. is it possible. i mean something like:
xcopy file1+file2+file3 destinationfolder
any help is appreciated :)

Was it helpful?

Solution

I don't think it's possible with a single xcopy, but you could use a for statement.
Something like:
for %f in (file1, file2, filen) do xcopy %f dest\

OTHER TIPS

for %f in (file1,file2,file3) do xcopy %f destinationfolder

if your files starts with a specific pattern, you can use wildcards (eg text files that starts with file)

copy file*.txt e:\destination

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top