Binding Reference for Format Expressions $ question

All about user-defined episode / movie / file name format expressions
Post Reply
nzdreamer55
Posts: 162
Joined: 20 Jul 2012, 23:25

Binding Reference for Format Expressions $ question

Post by nzdreamer55 »

Hello everyone,

So I am trying to write format expressions for use through the CLI and I am confused by the $ that I see sometimes. I cannot tell when to use it or why. Some examples show things like

{ [$vf]}

See here http://filebot.sourceforge.net/forums/v ... 5&t=2#p783

and then there are other time when there isn't a $

{ac}

See here the last one before Okam posts http://filebot.sourceforge.net/forums/v ... =5&t=2#p51

Could you help me understand when I should use it and when I shouldn't? I cannot figure it out from the examples :-(

Thanks again
-S
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Binding Reference for Format Expressions $ question

Post by rednoah »

Read this:
http://groovy.codehaus.org/Strings+and+GString

e.g. GString expressions

Code: Select all

{"The file $file has ${file.length()} bytes"}
is the same as

Code: Select all

{'The file ' + file + ' has ' + file.length() + ' bytes'}
As you can see $var allows you to build variables and code into String expressions.


PS: This is wrong [$vf]. It's either [vf] (array-definition) or "[$vf]" (string-definition).
:idea: Please read the FAQ and How to Request Help.
Post Reply