STOP and READUSE THIS TEMPLATENO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.
What is the problem you are having with rclone?
I want to match files with a certain pattern and if they match exclude the directory under the root that contains them. I have tried multiple versions, but the file movie_filter.txt contains the single line
- [Ss]?[0-9][0-9]?[xXeE.\-][0-9][0-9]?
Run the command 'rclone version' and share the full output of the command.
rclone v1.67.0
os/version: ubuntu 22.04 (64 bit)
os/kernel: 5.15.0-117-generic (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.22.4
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
webdav
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount --daemon alldebrid:/magnets /home/phire/docker/jellyfin/alldebrid/movies --umask 0222 --allow-other --filter-from /etc/rclone/movie_filter.txt
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[alldebrid]
type = webdav
url = https://webdav.debrid.it
vendor = other
user = XXX
pass = XXX
A log from the command that you were trying to run with the -vv flag
2024/07/31 08:39:45 DEBUG : Failed to find user cache dir, using temporary directory: neither $XDG_CACHE_HOME nor $HOME are defined
2024/07/31 08:39:45 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "mount" "-vv" "--daemon" "alldebrid:/magnets" "/home/phire/docker/jellyfin/alldebrid/movies" "--umask" "0222" "--allow-other" "--filter-from" "/etc/rclone/movie_filter.txt"]
2024/07/31 08:39:45 DEBUG : Creating backend with remote "alldebrid:/magnets"
2024/07/31 08:39:45 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/07/31 08:39:45 DEBUG : found headers:
2024/07/31 08:39:46 DEBUG : fs cache: renaming cache item "alldebrid:/magnets" to be canonical "alldebrid:magnets"
2024/07/31 08:39:46 DEBUG : rclone: Version "v1.67.0" finishing with parameters ["/usr/bin/rclone" "mount" "-vv" "--daemon" "alldebrid:/magnets" "/home/phire/docker/jellyfin/alldebrid/movies" "--umask" "0222" "--allow-other" "--filter-from" "/etc/rclone/movie_filter.txt"]
The.Man.From.Uncle.(1964).Complete-Z0DiAC99/The Man From Uncle - 4x15 - The Seven Wonders of The World Affair, Part 1.mp4
The Twilight Zone (1959) Season 1-5 S01-05 (1080p BluRay x265 HEVC 10bit AAC 2.0 ImE)/The Twilight Zone (1959) - S05E28 - Caesar and Me (1080p BluRay x265 ImE).mkv
this is not 100% perfect but the pattern will match both files.
can take that and tweak it for edge cases.
sorry, i do not have the time to create the perfect pattern for you.
rclone ls d:/tmp --include="*{{\dx\d\d|S\d\dE\d\d}}*"
125 The Man From Uncle - 4x15 - The Seven Wonders of The World Affair, Part 1.mp4
125 The Twilight Zone (1959) - S05E28 - Caesar and Me (1080p BluRay x265 ImE).mkv
There is no one way to solve it. You have to think what exactly is pattern your want to match. And as @asdffdsa mentioned there is no perfect one - especially for very vague requirement:)
The --exclude-if-present flag controls whether a directory is within the scope of an rclone command based on the presence of a named file within it. The flag can be repeated to check for multiple file names, presence of any of them will exclude the directory.
"named file"....
So its purpose is more like for other software respecting CACHEDIR.TAG or .ignore files to exclude directories.
It looks like I can definitely exlude files, but not the directory that has them when there are other unmatching files in there. I will have to look at writing some kind of tool on top of rclone for this.