Trying to exclude all files in specific directory


#1

I’ve been trying to get rclone to exclude all files in a specific directory
I tried --exclude “users” and also --exclude “.*/users/.*” and “/users/” None seems to work.


#2

What you want is --exclude "/users/** which means exclude the users directory in the root and all files and paths within that.

See ** in the patterns docs.


#3

thanks for that - I’d finally found it later on.

I used “ls” to test out the exclude, and the wining character combination is “users/**”
(as the users directory may not be in the root). “tmp/**” is a particularly useful one!