Use plain strings not glob in Filter as

Thank you for taking the time to read my question.

What is the problem you are having with rclone?

In short, I'm trying to use a text file of file paths as a filter, plain strings of absolute file paths on the file system that I want to be excluded from rclone sync commands, but this does not work with some special characters in the file names.

I've read through Rclone Filtering, and the first section talks about regex and patterns and glob, and that is all wonderful, but in this case I want absolute basic exact matching. I guess I could turn every string into a "match this exactly" RegEx, but that feels more complicated than is necessary. My problem is the filenames contain [ and {{ characters, but they are not RegEx or patterns.

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

rclone v1.65.0
- os/version: linuxmint 21.2 (64 bit)
- os/kernel: 5.15.0-89-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

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


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

rclone sync '/example' B2:Infinity/example --fast-list --transfers 20 -P --exclude-from exclusions.txt --dry-run

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

type = b2
account = XXX
key = XXX

type = dropbox
token = XXX

type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
root_folder_id = XXX
team_drive = 

A log from the command that you were trying to run with the -vv flag

2023/12/10 18:58:11 Failed to load filters: mismatched ']' in glob "example].file"

You want --files-from-raw if you don't want rclone to interpret the file names in any way.

1 Like

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