--exclude-from not working

Hi, I have a file tree that essentially looks like this:

I’m able to use the filter --exclude “Chuck/**”

And it excludes the folder Chuck and all subfolders and subfiles successfully which is what I want.

But I will be adding a lot of rules and need to use the exclude-from file.

So I made a excludetv.txt file and put a single line of the exact same pattern in the file: “Chuck/**”

Then I use --exclude-from /root/rclone/excludetv.txt to my command and it doesn’t work at all, nothing gets excluded.

Any ideas?

Search is your friend :slight_smile::

Basically, if you’re syncing TV Shows, you need to do something like --exclude="/Chuck/**"

I don’t think you read my post…

I have --exclude working just fine.

What is not working is when i put the exclude pattern in a file and use --exclude-from. It no longer works…

Sorry, can you post your file?

Or at least a subset of your file?

I provided all that in my original post.

My exclude file has a single line: “Chuck/**”

The exact same string pattern that works if i use --exclude

I’ll add more lines to my file after i can at least get it to work with 1 pattern.

Can you try adding a forward slash / to see if it makes a difference?

Tried “/Chuck/**” still no luck.

I’m reading this page: http://rclone.org/filtering/

And the example provided does not include quotes in the string. Maybe try that?

I just tried it and it works here (but I’m on linux)


  • Season 1
  • Season 2
  • Season 3
  • Season 4
  • Season 5

my exclude.txt file:

# Exclude file
/Season 1/**
/Season 2/**
/Season 3/**
/Season 4/**
/Season 5/**

And the command that worked for me:
rclone sync acdcrypt:tvshows/Chuck ~/tmp/Chuck -v --exclude-from ./exclude.txt

Only fanart.jpg and poster.jpg were present in ~/tmp/Chuck

How can I put Season 1, etc in my exclude file. I only want to exclude specific shows.

I’ll remove the quotes, but remember, it works if i use --exclude, just not when i put the exact same string in a file.

The example I provided was just an example

Your exclude file would be like so:

# Exclude file
/Show 2/**
/Show 3/**

and then you could do (like my example)

rclone sync acdcrypt:tvshows/ ~/tmp --exclude-from ./exclude.txt

To answer your question, I’m thinking the exclude file can’t include quotes. The quotes are used on the command line due to bash/other shells and ensuring you’re encapsulating the text correctly.

The file may not have that limitation if rclone is pulling it in directly. In fact, the quotes in the file may confuse it if it’s not expecting it.

Yeah, thanks Stokkes.

You are right about the quotes. It’s working now from the file with multiple shows. Even shows with spaces in the name are working as long as I don’t use quotes at all.

I figured I was just doing something simple wrong.