xcopy exclude switch

R

Richard

Hi

I can't seem to get the exclude switch to work in the xcopy command. I would
like to exclude 'folder1' in the batch folder. I have tried:

xcopy C:\Batch D:\Batch /D /C /E /H /Y /EXCLUDE:C:\Batch\Folder1
xcop "C:\Batch" "D:\Batch" /D /C /E /H /Y /EXCLUDE:C:\Batch\Folder1

Help appreciated.

Many thanks in advance
RIchard
 
P

Pegasus \(MVP\)

Larry Timms said:
Mind telling us? :)

Larry @ hasn't worked with DOS for a while...

He realised that the command
xcopy C:\Batch D:\Batch /D /C /E /H /Y /EXCLUDE:C:\Batch\Folder1
should read
xcopy C:\Batch D:\Batch /D /C /E /H /Y /EXCLUDE:C:\Batch\Exclude.txt

His initial thought was that the parameter following the /Exclude
says which files/folders should be excluded. Hen then realised
that this parameter must be the name of the text file that enumerates
the exclusions. Unfortunately he has yet to realise that answers to
posts are of value to other people too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Using xcopy for backup 10
XCOPY EXCLUDE command 2
Problem with batch file for backup using xcopy 7
Access is denied error 5
xcopy command not working 3
cannot use xcopy 3
Synchronizing files 18
Batch File Help 4

Top