Mount with excluding a specific directory

What is the problem you are having with rclone?

Mounting a HTTP backend with --exclude not working

What is your rclone version (output from rclone version)

v1.56.2

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

HTTP

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

rclone mount SeriesS-Z: /home/plex/tmp/SZ --allow-other --exclude="Tales of the City (TV Series 2019– ) 720p [Dual Audio]"/**

Hi,
I want to hide a specific directory from Plex. I want that, when I mount the HTTP backend it shouldn't contain the "Tales of the City (TV Series 2019– ) 720p [Dual Audio]" directory. I've tried a few times but it is always there.
Here is the directory architecture:

~/tmp/SZ$ ls 'Tales of the City (TV Series 2019– ) 720p [Dual Audio]'
 a_AL_.jpg   a_VL_.jpg  'Season 01'

~/tmp/SZ/Tales of the City (TV Series 2019– ) 720p [Dual Audio]/Season 01$ ls
'Tales of the City S01 E01-E05  720p NF WEBRip x264 MSubs [Dual Audio][Hindi 5.1+English 5.1] - mkvC.mkv'
'Tales of the City S01 E06-E10  720p NF WEBRip x264 MSubs [Dual Audio][Hindi 5.1+English 5.1] - mkvC.mkv'

This directory contains some corrupted video files that cause problems on Plex & also HTTP is a read-only backend so can't delete too!! If there is a way to just hide the MKV files that will work too. How can I do that ? Need help !!

Just delete the corrupted files on the source?

Can you run just a ls against the remote to get the exclude right?

rclone ls SeriesS-Z: --exclude="Tales of the City (TV Series 2019– ) 720p [Dual Audio]"/** -vv

and share the full output

What's the output of rclone version?
What's your rclone.conf without secrets/keys?

@Animosity022 Sorry, I don't have access to delete the files. Files are in someone else's server. Now either I've to hide the directory or media files.

Here is the "ls" output against the remote:

 154681 Tales of the City (TV Series 2019– ) 720p [Dual Audio]/a_AL_.jpg
    98102 Tales of the City (TV Series 2019– ) 720p [Dual Audio]/a_VL_.jpg
3031658904 Tales of the City (TV Series 2019– ) 720p [Dual Audio]/Season 01/Tales of the City S01 E01-E05  720p NF WEBRip x264 MSubs [Dual Audio][Hindi 5.1+English 5.1] - mkvC.mkv
2918007948 Tales of the City (TV Series 2019– ) 720p [Dual Audio]/Season 01/Tales of the City S01 E06-E10  720p NF WEBRip x264 MSubs [Dual Audio][Hindi 5.1+English 5.1] - mkvC.mkv

Full output of ls: SZ.txt (3.2 MB)
Full output of rclone version:

rclone v1.56.2
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-89-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: static
- go/tags: none

rclone.conf without secrets/keys:

[SeriesS-Z]
type = http
url = http://172.16.50.9/SAM-FTP-1/TV%20%26%20WEB%20Series/TV%20Series%20%E2%99%A6%20%20S%20%20%E2%80%94%20%20Z/

If you want to know what happened to Plex: Here

Can you please run that and share the full output?

I already shared. Have a look: SZ.txt (3.2 MB)

Command I used:

rclone ls SeriesS-Z: --exclude="Tales of the City (TV Series 2019– ) 720p [Dual Audio]"/** -vv >> SZ.txt

Please share the full output.

Here you go: ls full output.txt (3.2 MB)

I tried to paste directly here on the forum but it gives me an error. Maybe it's a huge directory that's why. Look at the new text file.

@Animosity022 let me know if you need anything I'm here !!

rclone's filtering is not quite regex so it has some quirks, not sure this is the best way, but something like this would work:

felix@gemini:~/test$ rclone ls /home/felix/test --exclude 'Tales of the City *TV Series 2019* * 720p *Dual Audio*/**'
        0 blah/hosts
felix@gemini:~/test$ rclone ls /home/felix/test
        0 blah/hosts
        0 Tales of the City (TV Series 2019– ) 720p [Dual Audio]/a_AL_.jpg
1 Like

@Animosity022 thank you very much. You just saved my day !!

@ncw Please implement the regex feature. It's really important. It will help with complex names like this. And also update the filtering documentation. It's hard to understand compared to other documentation, also add some directory examples there too.

hi,

filtering is an advanced feature and takes from trial and error to get it working.
as for directory filters, that is already documented at https://rclone.org/filtering/#how-filter-rules-are-applied-to-directories

as of now, rclone, via a bug i discovered, does support simple regex patterns.
https://forum.rclone.org/t/full-support-for-regex-for-filters/26883

1 Like

Fix planned for 1.58

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