Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

From xcopy /?

/EXCLUDE:file1[+file2][+file3]...
               Specifies a list of files containing strings.  Each string
               should be in a separate line in the files.  When any of the
               strings match any part of the absolute path of the file to be
               copied, that file will be excluded from being copied.  For
               example, specifying a string like \obj\ or .obj will exclude
               all files underneath the directory obj or all files with the
               .obj extension respectively.

But let's say that I want to EXCLUDE all .o files and INCLUDE all .odt files. If it was regex, I could use \.o$. But it's not, is it?

How do I do it?

(I'm not opposed to using rsync or something else, either.)

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You could try robocopy, the /xf switch can be used to exclude specific extensions.

share|improve this answer
    
Since robocopy ships with Windows-7, I'll take a look at it. Thanks for the pointer. –  JimB Aug 14 '11 at 13:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.