Speed up --include with cache or similar?

If the cache is built? Nearly instant. I think the results in above posts should 1-2 seconds.

Ah. Is there an rclone sync command for skipping empty directories? If I run it after rclone sync I cannot guarantee that a rclone sync is not currently running, mwhich will result in empty directories during a cache search.

I’m not aware of any rclone command that ignores empty directories. Probably best to wait to see how the cache item gets fixed.

You can remove them from the source before the copy with something like:

find . -type d -empty -delete

Okay, I will wait :slight_smile:
Removing them from source is not an option.

Thanks again for your help!

You could try doing a find and making an exclude file based on the empty dirs.

find /data/local -type d -empty >>blah

and just exclude blah. Not 100% sure that’ll work but perhaps worth a try.

Ah okay. Maybe there is an option to --exclude all empty folder without an actual exclude.txt list. Then again, there is no guarantee that will actually help with Cache.

you could put a file in them. I don’t know your data but popping a “.placeholder” will make them non-empty and able to be cached.

If you try the latest beta then sync does not create empty folders by default - you need to add the --create-empty-src-dirs flag.