Help with file naming script if it is a compilation or not

So I have made this naming script in my Picard, that names with Artist Folder/Date - Album/Discnumbertracknumber - tracktitle.

$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),%album%/,)$if($ne(%albumartist%,),$if($gt(%totaldiscs%,1),%discnumber%,)$num(%tracknumber%,2) ,)- %title%

If there is only one disc, it doesnt write disc number, and the track number is a minimum of 2 digits, more if the album surpasses the 100 tracks.
What I’me trying to do now is for it to know when it’s a compilation album, or Various Artists album, and if so then write the artist in the end of the file, ending something like “10 - musicname - artistname”.
Can it be done in my script?

Adding $if($eq(%compilation%,1), - %artist%) to the end of the script should work:

$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),%album%/,)$if($ne(%albumartist%,),$if($gt(%totaldiscs%,1),%discnumber%,)$num(%tracknumber%,2) ,)- %title%$if($eq(%compilation%,1), - %artist%)
1 Like

Yes it did! Thank you very much!

1 Like