Reputation: 13547
This is my copy command :
set POLL="C:\Documents and Settings\"
copy Register.class+Ca.class+pack %POLL% /-Y
pack is a folder here.
The result of the above copy coman is that only Register.class gets copied to the destination folder. What's my mistake?
Upvotes: 0
Views: 1197
Reputation: 5227
Naming multiple source files for a copy command copies the files into one single file.
copy fileone + filetwo filethree
would result in filethree containing the content of fileone AND filetwo. You cannot copy multiple files to a different location with copy.
However it is fairly easy to do so using either a loop or xcopy-command:
set POLL="C:\Documents and Settings\"
FOR %%F IN (Register.class Ca.class) DO copy %%F %POLL% /-Y
xcopy pack %POLL% /-Y
Upvotes: 1