How can I properly use commas in an exclude filter?

What is the problem you are having with rclone?

I'm trying to exclude multiple directories using a pattern list, and can't seem to figure out how to make it work.

Run the command 'rclone version' and share the full output of the command.

rclone v1.57.0-DEV
- os/version: fedora 34 (64 bit)
- os/kernel: 5.14.14-200.fc34.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.11
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Backblaze b2.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync --fast-list --skip-links --exclude '{/.zoom/,/.cache/}**' /home/myname/ home:/myname/

I also tried:

rclone sync --fast-list --skip-links --exclude '{/.zoom/**,/.cache/**}' /home/myname/ home:/myname/

The following works, but I'm hoping to use commas instead, to make the overall command shorter:

rclone sync --fast-list --skip-links --exclude /.zoom/** --exclude /.cache/** /home/myname/ home:/myname/

hello and welcome to the forum,

no worries, filters are confusing

easier to test using rclone ls, as that is not destructive like rclone sync
but if you want to test using rclone sync, perhaps use --dry-run

rclone ls /home/user01/source
        0 include/include.file
        0 .cache/cache.file
        0 .zoom/zoom.file
        0 .zoom/.zoom/zoom.file

rclone ls /home/user01/source --exclude='/{.zoom,.cache}/**'
        0 include/include.file
1 Like

That works! Thank you! It didn't occur to me to try putting the curly brackets within the slashes. So subtle. Thank you again!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.