Copy multiple folders with the same named keeping the same folder structure

I want to copy a couple hundred folders all called "Output" and reside inside a dated folder, but don't want to copy any other items from within that dated folder (example below):


ClientA_03102024

Capture

Selects

Output

Trash


How do I copy *just* the parent folder and the Output folder to an external drive? The other folders have large files I don't want, and I need to file organization of the parent folder names

Posted on Mar 19, 2024 4:32 AM

Reply

Similar questions

3 replies

Mar 19, 2024 5:38 AM in response to eightfifteen

You won't be doing this via the Finder, but you can from the Terminal using the rsync command. I just tested the following from my Desktop to a mounted USB stick and it copied ClientA_03102024 and the single Output subfolder to the external drive. The client folder is on my Desktop.



rsync -avz --include='Output/' --exclude={'Selects/','Trash/','Capture/'} ClientA_03102024 /Volumes/STUFF/


Result:



Is this what you are attempting to achieve?


Tested: macOS Sonoma 14.4, but should work the same on Monterey.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Copy multiple folders with the same named keeping the same folder structure

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.