I'm trying to copy a bunch of ISOs from one directory to another.
The source directory has the ISOs I want in a complex hierarchy of folders. I don't want that hierarchy copied to the destination, I just want the ISOs.
I want rsync to recursively search the source for directories called "base", and take the ISO from inside. But it should first exlude everything from any directory called "yeti".
So far I have:
Code:
rsync //samba/ ./ -nrvvP --include "*base*.iso" --include "*/" --exclude "yeti/" --exclude "*"
I'm not satisfied:
1. It will preserve the complex hierarchy.
2. It doesn't exclude yeti directories, or matchable files within yeti directories.
I'll keep hacking away at it, but help will be appreciated!