Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From xcopy /?

               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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .