# copying files with certain extension and overwriting

I do this often and I've seen similar questions but not quite the same.

I want to copy from z:\foo to c:\bar all .cfm files and overwrite any conflicts. I also want to keep the directory structure intact, so copy folders. I may want to copy more than .cfm files, but I'm guessing whatever answers given could be easily changed for this. Thanks in advance.

Also if you could please give a brief description of a solution so I don't have to ask a nearly identical question in the future.

I'm on Windows 7 Enterprise edition and working with networked drives.

-
Some combination of robocopy will definitely work for you here. –  user3463 Jun 14 '12 at 21:30

robocopy /is /e z:/foo c:/bar *.cfm