Page 1 of 1

if statement

Posted: 17 Oct 2013, 14:28
by Faba
Hy,

I didn't find any documantion concering how to use the "if" statement most of it I figured out by try and error.

my question is I want to use the {source} tag but only if it is not empty

My code is:

Code: Select all

{if ({source}) '.'{source}}
but didn't work, could you provide some assistance?

Thanks

Faba

Re: if statement

Posted: 17 Oct 2013, 14:33
by rednoah
It's that simple:

Code: Select all

{'.'+source}
If source fails, the whole {...} expression unwinds.


Plenty of examples here:
http://www.filebot.net/forums/viewtopic.php?f=5&t=2

Re: if statement

Posted: 17 Oct 2013, 14:43
by Faba
Wow that was fast!

I didn't try that one :)

Thanks