Fairly new to rclone. Just starting using it this evening. I’ve managed to get files uploading to Cloud Drive so off to a good start.
One thing I have noticed is it syncing up the hidden files as well which I don’t want it to do. Can anyone give me an example of a command with an exclude hidden files filter for “rclone sync”.
Not sure I can name them exactly without seeing what they are first. Sure I can enable show hidden files but to have to specify each one every time will become cumbersome. Can I not use some kind of wildcard? So that any files (or folders) that start with “.” are excluded?
Sure. To exclude all files starting with . you would use --exclude '.*', to exclude all files in a directory starting with . you would use --exclude ‘.*/**’
You can combine the two to make this --exclude '.*{/**,}'
Or put this in a file
.*
.*/**
And use --exclude-from file which gives you a chance to add other excludes you find
If you use the --delete-excluded with rclone sync flag then it will remove any excluded files. NB this command is very dangerous so test first with --dry-run!
Alternatively find all the DS_Store files like this
Is there any way to make these exclusions persistent? I.e. put them in the rclone.conf file or similar?
Annoying to have to specify them on the command line every time (yes I know I can put them in a file, but that still requires me to use the --exclude-from-file flag every time).
This would be akin to a .gitignore file in Git, for example.
I put both lines but rclone ls --filter-from exclude-files.txt outputs Failed to load filters: malformed rule ".*"
Anyway the rule seems to be followed.
And also as I understand, adding a third line /home/pi/Pictures/* will exclude only files, not folders belonging to Pictures. This rule is not followed.
Thanks
PS: relative path works good