Help with specific folder and file naming script

Hi! I am completely new to this tool and have been trying to setup a script that names my music and folders the way i want but can’t get it to work. In short i want the folders to be “Various Artists” when it’s a compilation or similar and only the original composers name when it’s classical music. Other music seems to be getting named the way i want already.

For file naming i would like to have %artist%/%album% %(releaseyear)%/%disc#%-%track#% - %track%
So what i want is: Alexander Borodin/Symphonies (2007)/1-01 Symphony No. 1 in E-Flat: I. Adagio – Allegro - Andantino

What I’m getting is: Borodin; Royal Stockholm Philharmonic Orchestra, Gennady Rozhdestvensky/Symphonies/1-01 Alexander Borodin - Symphony no. 1 in E‐flat major_ I. Adagio - Allegro - Andantino

Is this doable? Please let me know if i need to clarify anything/ made a mistake and thanks in advance!

Welcome to MusicBrainz, mogp~

I’m not too familiar with tagging classical music myself, so I don’t know if I can be much help there. it’s possible @rdswift or someone else might be able to help?

for “Various Artists”, is it not already sorting them that way? if not, you might use:

		[Various Artists],
	$noop(** put the rest of your code below here **)
	$noop(** put the rest of your code above here **)

you could use a different name for your “Various Artists” folder by replacing [Various Artists] above. be sure you leave the comma at the end of that line.

if you want all compilations in one folder, i.e. “Best of the Beatles” and the like, there’s also a way to do that. I forget the exact code offhand…

I believe that you will need to do this in two separate file naming scripts because I don’t know of any way for Picard to automatically know whether or not a release is Classical. Fortunately, the 2.7 version of Picard supports multiple file naming scripts and allows you to quickly select the one that you want to use. (I really need to find the time to update my file naming script to split it into two.)

It sounds like you’re already somewhat familiar with writing a file naming script, but you might want to have a look at the Writing a File Naming Script tutorial. If you run into any problems or have specific questions, please feel free to ask and we’ll try to help.

1 Like

I don’t know of any way for Picard to automatically know whether or not a release is Classical.

i’m very new to this so forgive me if i’m way off, but wouldn’t this be a workaround ?


Or Conductor / any tag only Classical files have? Again forgive me, i’m just beginning to tweak your great scheme, thanks alot for sharing it!

1 Like

Using the genre might work, but in many cases it simply isn’t set so it may miss correctly identifying a number of the releases / tracks / recordings.

This is another possible way, but again it relies on the releases / tracks / recordings having the appropriate tag being set. It also requires additional calls to MusicBrains for the extra information, which would slow the tagging process (although this likely wouldn’t be a problem unless you were tagging a large number of files).

In short, these are both good ideas although they may not be 100% reliable. Even so, they may be reliable enough for the vast majority of classical releases being tagged. Once you have some working code, please share it. I would love to see this automated, and I’m sure I’m not alone in that. Thanks.

1 Like


Since you are the resident classical “expert”, do you know of something specific within the data available to Picard that might be used to be able to reliably identify whether or not a release is “classical”?

I’ve tried it. Genre snippet works, a similar one based on Conductor works, but i’m not clear on how to give priority to other stuff.

e.g. The Grand Budapest Hotel goes into classics with this (it has conductor tag and classic genre) but i’d rather the scheme check for Soundtrack first. Seemingly the order in which i write doesn’t matter.

Your scheme is a god sent to get into file naming scheme anyway.

1 Like

Using your “genre” solution, I think it would prefer “soundtrack” over “classical” by doing something like:

    $set(_nFeat, [$if2(%TrackComposer%,%_nPTA%)])
1 Like

You’re amazing haha, this works. Then i’d say using this logic and adding exceptions and inclusions for all the odd cases in library is the way to go to “discriminate” files based on classic or not !

just popping in to note that genre is probably a better indicator than conductor. a couple examples might help:

  • false positive: big band jazz and traditional pop — specifically groups like Duke Ellington and his many jazz orchestras (an example release). Bing Crosby, Frank Sinatra, and others likely fall in this camp too
  • false negative: solo instruments and small ensembles — stuff like Bach’s Cello Suites and Beethoven’s “Moonlight” sonata for piano, where a conductor isn’t necessary
  • false negative: orchestral with a digital/“fake” orchestra — Makkon is a solo artist who composes classical music, but they don’t have an orchestra to work with. therefore they have to use sampled and synthesized instruments.

also to note, with the new genre entities @reosarevok is working on relating, it might be easier in the future to detect classical recordings using the subgenre relationship. don’t know if that’s possible yet without a Picard plugin or the like…

1 Like

It might not even be possible without a plugin currently, I think this subgenre info is not yet available via API

Thank you for the link. That worked for me!