Original path, RootFolderI:
RootFolderI/FolderA/Subfolder1/Subsub1/JPG1.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub1/JPG2.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub2/JPG3.jpg . . . RootFolderI/FolderB/Subfolder1/Subsub1/JPG4.jpg -> want this jpg RootFolderI/FolderB/Subfolder2/Subsub1/JPG5.jpg -> want this jpg RootFolderI/FolderB/Subfolder3/Subsub2/JPG6.jpg ...
There are many folders FolderA/B/C/etc, but the structure of folders inside is always the same (except the files, they are different)
I want to copy to
- only all the FolderA/B/etc
- all the files in Subsub1
...Resulting is this new path, RootFolderII:
RootFolderII/FolderA/ with JPG1.jpg, JPG2.jpg RootFolderII/FolderB/ with JPG4.jpg,JPG5.jpg
I've got at the moment the following code (but it's not working):
rsync -r --include='Folder*/Subfolder1/Subsub1/***' --exclude="/*/*/" /RootFolderI/ /RootFolderII/
--exclude="/*/*/" : creates FolderA/B/... -> working
--include='Folder*/Subfolder1/Subsub1/***' : i want to copy all files (not the structure) ... -> it's not working
??? well, I think that even if it was working, it would copy files from FolderB to FolderA, and I don't want that!