How is this question related to Exclude Blacklist & Series-Mappings?ffreese wrote:Hi,
for me there was one big reason to stay at v 4.2 with the old gui: I run filebot on a server and use x2go for access.
As newer filebot versions need glx > V1.3 they simply do stall, because x2go is stuck at V1.2...
Maybe we could have a modern version with oldstyle-gui for older pc or x2go-users?
POSTBUCKET - where random posts in unrelated topics go
Re: Exclude Blacklist & Series-Mappings
Usage Examples
1. Rename files with FileBot:
2. Confirm that FileBot metadata has been stored as xattr in the filesystem:
3. Use xattr metadata in filter and format expressions:
4. Process xattr tagged files based on existing xattr metadata:
Code: Select all
$ filebot -rename *.mp4 --db TheMovieDB -non-strict
Rename movies using [TheMovieDB]
Auto-detect movie from context: [avatar.mp4]
[MOVE] From [avatar.mp4] to [Avatar (2009).mp4]
Processed 1 files
Code: Select all
$ filebot -script fn:xattr *.mp4
/path/to/Avatar (2009).mp4
net.filebot.filename: avatar.mp4
net.filebot.metadata: {"@type":"Movie","year":2009,"imdbId":499549,"tmdbId":19995,"language":"en","id":19995,"name":"Avatar","aliasNames":[]}Code: Select all
$ filebot -mediainfo -r . --filter "y >= 2000" --format "{n} by {director}"
Avatar by James CameronCode: Select all
filebot -rename -r . --db xattr --action copy --output /Volumes/USB --filter "episode && age < 30" --format "{n} - {sxe} - {t}"Process without --db ??
Is it possible to process files without the use of a database?
All I'm trying to do is organize a flat folder into sub-directories: e.g.
$:~/Movies> tree
.
├── Video - 01.mp4
├── Video - 02.mp4
├── Video - 03.mp4
├── Video - 04.mp4
└── Video - 05.mp4
Would be processed and become:
$:/mnt/data/test> tree
├── 480x270
│ └── Video - 03.mp4
├── 640x360
│ └── Video - 04.mp4
└── 960x540
├── Video - 01.mp4
├── Video - 02.mp4
└── Video - 05.mp4
I can accomplish this with:
$:~/filebot.sh -script fn:amc ./ --output "/mnt/data/sorted" --action copy --conflict auto --def "movieFormat={resolution}/{fn}"
but it pointlessly tried to identify/match the files.
I also tried:
filebot.sh -rename . --db xattr --action copy --format {resolution}/{fn}
which returns:
Rename files using [Extended Attributes]
Failed to identify or process any files
Failure (°_°)
All I'm trying to do is organize a flat folder into sub-directories: e.g.
$:~/Movies> tree
.
├── Video - 01.mp4
├── Video - 02.mp4
├── Video - 03.mp4
├── Video - 04.mp4
└── Video - 05.mp4
Would be processed and become:
$:/mnt/data/test> tree
├── 480x270
│ └── Video - 03.mp4
├── 640x360
│ └── Video - 04.mp4
└── 960x540
├── Video - 01.mp4
├── Video - 02.mp4
└── Video - 05.mp4
I can accomplish this with:
$:~/filebot.sh -script fn:amc ./ --output "/mnt/data/sorted" --action copy --conflict auto --def "movieFormat={resolution}/{fn}"
but it pointlessly tried to identify/match the files.
I also tried:
filebot.sh -rename . --db xattr --action copy --format {resolution}/{fn}
which returns:
Rename files using [Extended Attributes]
Failed to identify or process any files
Failure (°_°)
Re: Q&A for n00bs
-non-strict allows you to process files that are not xattr tagged:
@see viewtopic.php?f=4&t=4788
Code: Select all
filebot -rename *.mp4 --action duplicate --db xattr -non-strict --format {resolution}/{fn}Re: Q&A for n00bs
Really!?!?! that's all I was missing. I thought -non-strict was just for oddly named files.
Learn something new everyday. Your next beer is on me via paypal.
Learn something new everyday. Your next beer is on me via paypal.
Re: Q&A for n00bs
-non-strict has different meanings in different contexts. If you're using --db xattr with -non-strict then -non-strict refers to not strictly processing only xattr tagged files.
Re: Q&A for n00bs
Makes sense. Thanks for your help. I spent the better part of the day trying to make that little one-liner work.
-
stephen147
- Donor
- Posts: 131
- Joined: 01 Sep 2015, 22:40
Re: Presets
Could you add the ability to overwrite or keep file extension in the presets.
I overwrite my movies while keep extensions on TV programs.
I overwrite my movies while keep extensions on TV programs.
Re: Presets
Extension: Preserve / Override works independently of Presets and cannot be enabled/disabled via clicking a Preset.
If I make it too easy, then the novice folks will accidentally delete all their extensions and then blame FileBot.stephen147 wrote:Could you add the ability to overwrite or keep file extension in the presets.
Why do your movie files have the wrong extension? I've never once come across a movie file with the wrong extension.stephen147 wrote:I overwrite my movies while keep extensions on TV programs.
-
stephen147
- Donor
- Posts: 131
- Joined: 01 Sep 2015, 22:40
Re: Presets
Could that option not be enabled by default so the user can't tamper with it or warning if checkbox is ticked?
It's the only way to rename subtitles and movies together in same rename by using this:
It's the only way to rename subtitles and movies together in same rename by using this:
Code: Select all
{n.replace(':','-').replaceAll(/[\/:*?"<>|]/,' - ')} ({y}) {any{fn.match(/(?i)25th.+?anniv/)}{''}.replaceAll(/(?i).*25th.+?anniv.*/, "(25th Anniv. Edition)")} {any{fn.match(/(?i)remastered/)}{''}.replaceAll(/(?i).*Remastered.*/, "(Remastered)")} {any{fn.match(/(?i)extended.+?edit/)}{''}.replaceAll(/(?i).*Extended.+?Edit.*/, "(Extended Edition)")} {any{fn.match(/IMAX.+?Edition/)}{''}.replaceAll(/(?i).*imax.+?edition.*/, "(IMAX Edition)")} {any{fn.match(/(?i)direct.+?cut/)}{''}.replaceAll(/(?i).*direct.+?cut.*/, "(Director's Cut)")} {any{fn.match(/(?i)unrated/)}{''}.replaceAll(/(?i).*unrated.*/, "(Unrated)")} {any{fn.match(/(?i)\(limited.*?\)/)}{''}.replaceAll(/(?i).*limited.*/, "(Limited Edition)")} {any{fn.match(/(?i)\(uncut.*?\)/)}{''}.replaceAll(/(?i).*uncut.*/, "(Uncut)")} {any{fn.match(/(?i)collector.+?s.+?edition/)}{''}.replaceAll(/(?i).*collector.+?s.+?edition.*/, "(Collector's Edition)")} {any{fn.match(/\([^\()+?[^\d]+?\)\s*/)} {""}{''}} {self.vf ? self.vf + "" : self.hpi} {"${self.source ?: 'WEB-DL'}"} {ac} {audio[0].channels.replaceAll(/^(\d{1}).*/,'$1')replaceAll(/2/, "2ch").replaceAll(/6/, "5.1ch").replaceAll(/8/, "7.1ch")} {vc}_{any{"$group"}{fn.match(/(?<=[_-])[^\s_-]+?$/)}{'NA'}.replaceAll(/[-_\[\]]\s*|\.\w{3}$/, "")}/{n.replace(':','-').replaceAll(/[\/:*?"<>|]/,' - ')} ({y}) {any{fn.match(/(?i)25th.+?anniv/)}{''}.replaceAll(/(?i).*25th.+?anniv.*/, "(25th Anniv. Edition)")} {any{fn.match(/(?i)remastered/)}{''}.replaceAll(/(?i).*Remastered.*/, "(Remastered)")} {any{fn.match(/(?i)extended.+?edit/)}{''}.replaceAll(/(?i).*Extended.+?Edit.*/, "(Extended Edition)")} {any{fn.match(/IMAX.+?Edition/)}{''}.replaceAll(/(?i).*imax.+?edition.*/, "(IMAX Edition)")} {any{fn.match(/(?i)direct.+?cut/)}{''}.replaceAll(/(?i).*direct.+?cut.*/, "(Director's Cut)")} {any{fn.match(/(?i)unrated/)}{''}.replaceAll(/(?i).*unrated.*/, "(Unrated)")} {any{fn.match(/(?i)\(limited.*?\)/)}{''}.replaceAll(/(?i).*limited.*/, "(Limited Edition)")} {any{fn.match(/(?i)\(uncut.*?\)/)}{''}.replaceAll(/(?i).*uncut.*/, "(Uncut)")} {any{fn.match(/(?i)collector.+?s.+?edition/)}{''}.replaceAll(/(?i).*collector.+?s.+?edition.*/, "(Collector's Edition)")} {any{fn.match(/\([^\()+?[^\d]+?\)\s*/)} {""}{''}} {self.vf ? self.vf + "" : self.hpi} {"${self.source ?: 'WEB-DL'}"} {ac} {audio[0].channels.replaceAll(/^(\d{1}).*/,'$1')replaceAll(/2/, "2ch").replaceAll(/6/, "5.1ch").replaceAll(/8/, "7.1ch")} {vc}_{any{"$group"}{fn.match(/(?<=[_-])[^\s_-]+?$/)}{'NA'}.replaceAll(/[-_\[\]]\s*|\.\w{3}$/, "")}{any{'.'+lang}{lang}}{any{fn.match(/(?i)sdh.+?/)}{''}.replaceAll(/(?i).*sdh.*/, "_SDH")}{any{fn.match(/(?i)\(foreignpartsonly\)/)}{''}}{"."+ext}Re: Presets
How so? What's the problem?stephen147 wrote:It's the only way to rename subtitles and movies together
Extension: Override only allows you to change ".sub" to ".srt". Why would you do that? In fact, you're not even trying to do that. Your format ends with {"."+ext} so you apparently want to keep the extension.
-
stephen147
- Donor
- Posts: 131
- Joined: 01 Sep 2015, 22:40
Re: Presets
I'll need to revisit this again when I've time.
It was the only way for me to use them bindings successfully to rename movie and sub files was to have the override extension enabled and then rewrite it back again using {"."+ext}.
It was the only way for me to use them bindings successfully to rename movie and sub files was to have the override extension enabled and then rewrite it back again using {"."+ext}.
-
kindofblue91
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
I apologize in advance if this is an easy fix!
So pretty frequently I'm getting a "file is being used" error when uTorrent runs my post-download amc script. To remedy this for now, I've created a scheduled task to run my sort command, to scoop up any files that the post-download script couldn't immediately grab.
My issue is that even if the rename/file transfer errors out with "file is being used", the filename is being written to the exclude list.
So the question is, am I able to setup the script so if Filebot errors out on a file, that file is NOT added to the exclude list?
If that is not possible, is it possible to run the uTorrent post-download script WITHOUT --def excludeList? The scheduled task would still have --def excludeList. Haven't removed that line because of your indication that frequent repeats would constitute a ban from the script.
Thanks so much!
If it helps any, here are my 2 scripts:
uTorrent post-download
Scheduled task
So pretty frequently I'm getting a "file is being used" error when uTorrent runs my post-download amc script. To remedy this for now, I've created a scheduled task to run my sort command, to scoop up any files that the post-download script couldn't immediately grab.
My issue is that even if the rename/file transfer errors out with "file is being used", the filename is being written to the exclude list.
So the question is, am I able to setup the script so if Filebot errors out on a file, that file is NOT added to the exclude list?
If that is not possible, is it possible to run the uTorrent post-download script WITHOUT --def excludeList? The scheduled task would still have --def excludeList. Haven't removed that line because of your indication that frequent repeats would constitute a ban from the script.
Thanks so much!
If it helps any, here are my 2 scripts:
uTorrent post-download
Code: Select all
filebot -script fn:amc --output "D:\Plex" --action move --conflict skip -non-strict --log-file amc.log --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" excludeList=amc.txt movieFormat="D:/Plex/Movies/{fn}" seriesFormat="D:/Plex/TV/{fn}"Code: Select all
filebot -script fn:amc --output "D:\Plex" --action move --conflict skip -non-strict "C:\Users\username\Downloads" --log-file amc.log --def excludeList=amc.txt movieFormat="D:/Plex/Movies/{fn}" seriesFormat="D:/Plex/TV/{fn}"Re: Q&A for n00bs
1.
You can't use --action move on files that are being seeded. My recommendation is to use --action duplicate and to make sure that input/output folder are on the same drive (i.e. your Downloads and Plex folder should be on Drive D:) so that it can create hardlinks instead of having to physically copy the data from one drive to another.
You want to seed files and you want to create an additional file entry (i.e. hardlink) in your Plex folder. That is not a problem. You can have the same file twice (or many times) without using any extra disk space.
@see https://en.wikipedia.org/wiki/Hard_link#Example
2.
If you're using {fn} as format, then I see no reason to use FileBot or the amc script at all actually. There's simpler tools for just moving files into folders. You're using a space ship when you should be using a tractor.
If you use Plex on your Plex folder, Plex will definitely not be happy with a flat folder of completely and utterly unorganized files. 
Are you sure you know what {fn} means?
You can't use --action move on files that are being seeded. My recommendation is to use --action duplicate and to make sure that input/output folder are on the same drive (i.e. your Downloads and Plex folder should be on Drive D:) so that it can create hardlinks instead of having to physically copy the data from one drive to another.
You want to seed files and you want to create an additional file entry (i.e. hardlink) in your Plex folder. That is not a problem. You can have the same file twice (or many times) without using any extra disk space.
@see https://en.wikipedia.org/wiki/Hard_link#Example
2.
If you're using {fn} as format, then I see no reason to use FileBot or the amc script at all actually. There's simpler tools for just moving files into folders. You're using a space ship when you should be using a tractor.
-
kindofblue91
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
Thanks for the reply!
I'm using Filebot because I couldn't find a tool to accurately sort Movies/TV Shows on Windows. On Mac, I had a Folder Action set up that performed this nicely (with few errors, it searched the filename for S**E**)
I just have 2 Plex libraries, one at D:\Plex\Movies & one at D:\Plex\TV.
I'm using Filebot because I couldn't find a tool to accurately sort Movies/TV Shows on Windows. On Mac, I had a Folder Action set up that performed this nicely (with few errors, it searched the filename for S**E**)
Plex doesn't seem to mind unorganized files just sitting in their TV/Movie folder...at least, as far as I can tell!If you use Plex on your Plex folder, Plex will definitely not be happy with a flat folder of completely and utterly unorganized files.
Yes, using {fn} because I didn't see a need to rename the files.Are you sure you know what {fn} means?
Re: Q&A for n00bs
Plex is very explicit about how files must be organized:Plex wrote:It's important that your media files and library folders are named and organized
https://support.plex.tv/hc/en-us/catego ... reparation
You're either insanely lucky, or you just haven't seen much yet.kindofblue91 wrote:Yes, using {fn} because I didn't see a need to rename the files.
-
kindofblue91
- Posts: 3
- Joined: 13 Apr 2017, 15:38
Re: Q&A for n00bs
Oh jeez, my TV library would probably give you a hernia, then! My thought process was that once Plex has indexed the library, it wouldn't really care that all episodes aren't grouped in a series-named sub-folder


Re: Q&A for n00bs
Sure, but to correctly index your library, it needs to make sense first. With flat files like this, it might work sometimes, maybe even most of the time, but certainly not all the time. 
syntax error near unexpected token `('
Command:
Error:
-script fn:sysinfo
I'm pulling my hair out with this. I really could use an extra set of eyes on my script call.
Code: Select all
filebot -rename *.mkv --output /mydir --format {n}/{episode.special ? "Specials" : "Season "+s.pad(2)}/'{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}' --db TheTVDBCode: Select all
syntax error near unexpected token `('Code: Select all
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.73
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-04-03 (r494)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_65
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 224 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
Package: DEB
Data: /---/---/.filebot
uname: Linux ---4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
-
Santaspascuas
- Posts: 2
- Joined: 24 Apr 2017, 13:50
Re: [Mac] Folder Action with Automator
Hi,
I have followed all your steps, and when I run the Automator I get the following error message: "Illegal usage: output folder must exist and must be a directory: "Media".
I have a folder called Media (users/alvaro/Media) *alvaro is my name
Can you help me with this issue? It is my first time writing scripts and I have no clue of the proper spelling of the output route.
Thanks!
I have followed all your steps, and when I run the Automator I get the following error message: "Illegal usage: output folder must exist and must be a directory: "Media".
I have a folder called Media (users/alvaro/Media) *alvaro is my name
Can you help me with this issue? It is my first time writing scripts and I have no clue of the proper spelling of the output route.
Thanks!
Re: [Mac] Folder Action with Automator
Thanks for the post! Before a real human comes by, please make sure your report has all the following points checked:
Please read How to Request Help and Fix Problems, Report Bugs, Get Features
- What are you trying to do achieve? What's not working? What have you tried so far?
- Include screenshots, logs or filenames (i.e. demonstrate the issue)
- Include basic information (i.e. sysinfo output)
-
Laynezilla
- Posts: 1
- Joined: 25 Apr 2017, 04:27
Re: --filter and fine-tuning
Is there a complete list of filters anywhere?
Re: --filter and fine-tuning
What's the problem? What are you trying to accomplish?
-
Santaspascuas
- Posts: 2
- Joined: 24 Apr 2017, 13:50
Re: [Mac] Folder Action with Automator
Hi rednoah, apologies for the lousy help request. I have now read the FAQ and the How to Request Help section. I am sorry if I still make mistakes, because I am not English fluent and I dont understand many of the words and instructions. Here I go:
I am running automator on a Mac Mini, runnin OS Sierra 10.12.4.
I am trying to set Automator to look up the destination folder of Transmission (called "Transmission"), where all the movies and tvshows are dowloaded, and process the media files through Filebot to rename them and send them to the Media folder.
Hopefully, in a second stage I would like to send the renamed files to external hard drives and even get the subtitles, but I dont want to bother you even further.
I have installed the filebot console tools and checked that are working.
When I follow the instructions given by you in this post, I open Automator, I select new Document and select Folder Action.
I click the Choose folder combobox and select the folder "Transmission"
When I paste the shell script arguments exactly as you say ("$HOME/Media"), I get the following error: http://i.imgur.com/ALOgN6r.png
If I write another route (/Users/alvaro/Media), the message is similar (quoting and unquoting): http://i.imgur.com/CAHmOX6.png
I hope I've provided enough information.
Many thanks in advance!
I am running automator on a Mac Mini, runnin OS Sierra 10.12.4.
I am trying to set Automator to look up the destination folder of Transmission (called "Transmission"), where all the movies and tvshows are dowloaded, and process the media files through Filebot to rename them and send them to the Media folder.
Hopefully, in a second stage I would like to send the renamed files to external hard drives and even get the subtitles, but I dont want to bother you even further.
I have installed the filebot console tools and checked that are working.
When I follow the instructions given by you in this post, I open Automator, I select new Document and select Folder Action.
I click the Choose folder combobox and select the folder "Transmission"
When I paste the shell script arguments exactly as you say ("$HOME/Media"), I get the following error: http://i.imgur.com/ALOgN6r.png
If I write another route (/Users/alvaro/Media), the message is similar (quoting and unquoting): http://i.imgur.com/CAHmOX6.png
I hope I've provided enough information.
Many thanks in advance!
Re: [Mac] Folder Action with Automator
The best solution is to have Transmission call FileBot on completed downloads. Here's the setup instructions for that:
viewtopic.php?f=4&t=215#p3380