Robocopy Files Only and Not Sub Folder Structures

40 Views Asked by At

I'm trying to Robocopy files from a directory that has about 100 subfolders with thousands of files in each subfolder to a Single Folder. I don't need the subfolder structure, I just need the files out of each subfolder.

Is there a switch to exclude copying over the folder structures using just Robocopy? I'm trying to stick with just Robocopy to eliminate any extra validation when doing custom code.

The is a sample of what I have together already and just need to plug in that exception.

robocopy SourceFolder DestinationFolder "keywordInFileName*" /S /COPY:DATSOU /DCOPY:DAT /IS /R:10 /W:5 /LOG+:C:\RoboCopyLog%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%.txt

Can't find anything using just Robocopy.

0

There are 0 best solutions below