I want to copy files /SRC/**/OK/**/*OK* to /DEST/**/OK/**/*OK* using rsync.
For all the files to copy, there must be a folder named OK in the full path and a OK in the filename.
I tried
rsync -avP --include='**/OK/**/*OK*' --include='*/' --exclude='*' --inplace SRC DEST
It doesn't work.
rsync -avP --include='*OK*' --include='*/' --exclude='*' --inplace SRC DEST
works but it creates all the folders, no matter whether they contain OK in the full path or not.