Excluding directiries and files with special characters


i have read the documentation and also done a search - but not found any answer suiting my problem. So don’t beat me if i missed soemthing.

Ok, to my question:
i use rclone (latest stable build) and Amazon Drive. Got it to work as documented.
I now want to do a regular sync of my Synology drive (i use Amazon Drive as a kind of Backup)

Within the Synology drives, there are subfolders named $RECYCLE.BIN or #recycle. In addition, there is somehting like a stream (?) but not a physical (visible) subdirectory named @eaDir.

I already tried to use the --exclude and also --exclude-from options.
Tried with name as above and also within doeble brackets and also escaped with ‘’.
Also tried *eardir and similar.

But those are still synced but not excluded.
Sure i am missing something simple and obvious - sure someone of you can help me getting this done?!

Thanks in advance,
Alsbucher aka Ralf

Really nobody can help me?

If you’ve got difficult file names then sticking them in an --exclude-from file is the best. Post the contents of your file would be helpful.


thanks for help in advance.
I put the following in the exclude file, named rclone-exclude.txt

#recycle The original name
#recycle My try of escaping the character
@eaDir Original name
@eaDir Again my try of escaping

Called it with rclone --exclude-from rclone-exclude.conf source dest
Path of exclude file is correct, double-checked this.

/ Ralf

In one you said ‘txt’ in the other you said ‘conf’. Is the file name correct?

If you want to exclude a directory and all of its contents you need a different syntax.

So I think something like this should work in your --exclude-from file


Note that #recycle needed a \ before the # as # is the comment character.

See http://rclone.org/filtering/ for more details


Thanks very much, ncw.
Thats exactly what i needed.

As thought, it’s quite simple… adding a /** and… the excludes work!

Maybe adding it to the webpage could also help others?

Now i setup a script to sync my NAS content with ACD and i now have an online backup outside my house! Great tool!

1 Like