You can use if-then-else blocks or the ternary operator for conditional code.
Example 1: Move 3D movies and normal movies into different folders:
Code: Select all
{fn =~ /3D/ ? '3D Movies' : 'Movies'}
Code: Select all
{if (bitdepth == 10) ' [10bit]'}
Code: Select all
{bitdepth == 10 ? ' [10bit]' : null}
Code: Select all
{any{collection}{genre}{'No Genre'}}
Bindings and functions may throw exceptions so the result may be neither true nor false:
Code: Select all
{'Avatar'.match(/3D/) ? 'X' : 'Y'} ⇨ Exception: Pattern not found