Convert Tag - Filename: Possible to leave out values if tag field is emtpy?


#1

Hi all,

I tried to find the answer to my question, but was unable to. Maybe someone readily knows the answer!

I am starting to use the 'Band' (Album Artist) field, specifically for Mixed Albums, whereby the DJ is the Album Artist and per track Artists may differ. Now, for these instances, I want to convert the Tags to filenames like so:

%album% (%band%) - $num(%track%,2) - %artist% - %title%

Since I have many albums already tagged where %artist% equals %band%, I only want to include %band% in the filename when the tag field is not empty.

So, the question is: in the string above for converting tags to filename, is there a possibility to only include the value of the band tag (including the brackets) when this field is not empty?

Thanks!

EDIT:
Guys, after having looked around a bit further I managed to answer my own question:

%album%[ (%band%)] - $num(%track%,2) - %artist% - %title%

Cheers!


#2

See help file/Scripting functions:
[...] The contents of brackets are displayed only if at least one of the placeholders used inside the brackets has been found.

Try this:
%album% [(%band%) ]- $num(%track%,2) - %artist% - %title%

DD.20071129.1159.CET


#3

Hey DetlevD,

Thanks, I already found out about this! Works great!

Cheers