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.

Simply put, my question is the same as this but for Windows 7 Ultimate 64-bit.

Note that I want to copy only files of a specific file type, and that I must preserve the directory structure and names. In other words, I want to do the same as copying a folder and its subfolders (e.g. I want to copy foo/myfolder to moo/myfolder), but leave out all the files except those of a specific file type (e.g. .txt files).

Hope my question is clear enough, and that this is possible!

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted
xcopy /s foo\myfolder\*.txt moo\myfolder
share|improve this answer
    
Thanks! Didn't try it till now, but works like a charm. I made a .bat file out of it so I don't have to type it each time. –  puggsoy Jun 7 '12 at 20:43
    
How do you know when this is done? Does the blinking cursor come up again? –  Celeritas Jun 11 '12 at 18:24
    
Well, if you put it into a batch file it'll open in a console window, list all the files that it's copying, then close when it's done.If you're just typing it in straight from the console, I'd guess that it also lists the files that it's copying, then when it's done it'll stop and the blinking cursor will return. –  puggsoy Jun 13 '12 at 20:13
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.