0

I have a folder structure, let's call it C:\source, and beneath it are various folders. In those folders are a variety of files. I want robocopy to copy all .DOC files in the entire source tree to a destination, let's call it C:\destination

I am not particularly interested in the folders they came out of and would prefer that it just dump all of the .DOC files into the destination folder.

robocopy c:\source c:\destination *.doc

only seems to look in the c:\source directly without checking in any subfolders.

1

1 Answer 1

0

Robocopy just complicates the task. A much simpler tool to use here is the old copy command combined with FOR /R:

for /r source-folder %f in (*.doc) do @copy "%f" target-folder

If you wish to compare this command with an example of using robocopy, see the article Flattening a directory tree with RoboCopy.

You must log in to answer this question.

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