Filebot Node & "File Selector Expressions"

Any questions? Need some help?
Post Reply
coldnose
Posts: 8
Joined: 15 Jan 2018, 23:28

Filebot Node & "File Selector Expressions"

Post by coldnose »

Two newbie questions:

1) I have Filebot Node running on a QNAP (TVS-471) and it works okay except it has been messing up some renames (especially UFC files). Here's a log of a recent event https://pastebin.com/cAzzNP5w in which it grabbed the wrong name and switched filenames. Can you please advise on how to prevent these?

2) For Presets, is there documentation/help for the "File Selector Expression"? There are a few examples in your Preset examples but I can't find what I need (For example, include files with "Prelim" in the name but ignore files with "Other" in the name, etc.).

Thanks!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Node & "File Selector Expressions"

Post by rednoah »

1.
You could add an ignore pattern for tricky files that are giving you trouble:

Code: Select all

--def ignore=UFC
Alternatively, a nifty --filter expression could probably be used to help things along:
viewtopic.php?t=2127


2.
--file-filter expressions and friends all work identical to format expressions, so the same documentation applies, and you can test your filter in the Format Editor GUI all the way until you copy and paste it elsewhere.

e.g. Include "Prelim" files:

Code: Select all

fn =~ /Prelim/
e.g. Exclude "Other" files:

Code: Select all

!(fn =~ /Other/)
:idea: Please read the FAQ and How to Request Help.
coldnose
Posts: 8
Joined: 15 Jan 2018, 23:28

Re: Filebot Node & "File Selector Expressions"

Post by coldnose »

rednoah,

Thanks for the quick help. A few follow-up questions though:

1) How to put the

Code: Select all

--def ignore=UFC
in Filebot Node's GUI? (and side question: if I change the configuration in Filebot Node GUI, do I need to run Execute/Schedule again for it to take effect? This creates a new job # for my CRON).

2) I'm using:

Code: Select all

fn =~ /(?i)Prelims/ && !(fn =~ /other/)
but it doesn't work. What am I doing wrong? I read the https://www.filebot.net/naming.html but it doesn't really cover "and" or "or" - is there more documentation?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Node & "File Selector Expressions"

Post by rednoah »

1.
FileBot Node has a corresponding input field.


2.
Your code looks good to me. Presumably, your code works, but doesn't do what you intend to do. My first question, what is the value of fn when it doesn't work as expected?

Code: Select all

def x = 'Prelims'
x =~ /(?i)Prelims/ && !(x =~ /other/)
// Result: true

Code: Select all

def y = 'other Prelims'
y =~ /(?i)Prelims/ && !(y =~ /other/)
// Result: false
:arrow: https://docs.groovy-lang.org/latest/htm ... _operators

The Groovy documentation will cover syntax and language in detail. The FileBot naming docs cover aspects specific to FileBot, i.e. bindings and extension methods.

:arrow: viewtopic.php?t=10824
:idea: Please read the FAQ and How to Request Help.
coldnose
Posts: 8
Joined: 15 Jan 2018, 23:28

Re: Filebot Node & "File Selector Expressions"

Post by coldnose »

Rednoah, Thank you for the response and links. I got the selection code to work after reviewing the details in the documentation. Very helpful!

I wasn't sure how to enter the expression into Filebot Node's GUI, but I must have guessed correctly as it works in a test run! Again, thank you.

I'm grateful for the help. Filebot is a wonderful product but a bit overwhelming with all its power.
Post Reply