Naming Script Noob for Singles and The

I tried to read multi posts and about 10% stuck to my Friday morning brain, so sorry for another post but please throw me a bone. My current very basic naming script is at the end of this post but it basically looks like:

.\x\xArtist\Album\01 - songtitle.ext

Where: x is the first letter of the artist from albumartist

I would like to add two adds.


  1. Singles

If the files are tagged with releasetype = single, (the modern kind that are released as actual single songs electronically [as opposed to a single with multiple songs on it]), I would like the naming to move the file like this:

.\x\xArtist\Singles\YYYY\songtitle.ext

Where: x is the first initial of the artist name, Singles is a static directory, YYYY is the year released, there is no track number (optionally) (by the way, I am not sure why Picard adds a track number to these digital single releases, but overthinking it)



  1. The The

My second issue us with using the first initial of the artist name. For bands that start with ā€œTheā€ I had started using the sorted artist tag which looks like ā€œBeatles, Theā€. But I like my artists listed by first name, so this is causing my problems. I can’t figure out how to script something that looks for the letter ā€˜b’ from ā€œThe Beatlesā€.

$left($if(%artistsort%,%artistsort%,%albumartist%), 1)/

$if(%artistsort%,%artistsort%,%albumartist%)/

%album%/

$num(%tracknumber%,2) - %title%

1 Like

The following is quick code that I just hacked together which I think might get you a bit closer to what you’re after. I haven’t tested it, so there may be bugs.

$upper($left($if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%),1))/$if2(%albumartist%,%artist%)/$if($eq(%_primaryreleasetype%,single),Singles/$left($if2(%date%,%originaldate%,%_recording_firstreleasedate%,9999),4)/,%album%/$if($gt(%totaldiscs%,1),%discnumber%-)$num(%tracknumber%,2) - )%title%

If you have any questions, please let me know.

2 Likes