Give this a try. It might not be exactly what you’re looking for but I think it should be close.
$upper($firstalphachar(%albumartistsort%,nonalpha="#"))/%albumartist%/$left($if2(%date%,%originaldate%,0000),4) - %album%/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2) - %title%
The steps taken in the script are:
- $upper( makes the alphabetical directory upper case.
- $firstalphachar( returns the first alpha character of the text provided - in this case the sorted version of the album artist name. If the first character is not an alpha the nonalpha=“#” part causes it to return an octothorpe.
- /%albumartist% inserts a path separator to create a new subdirectory called the name of the album artist.
- /$left( inserts a path separator to create a new subdirectory under the artist directory called “year - album name”. This subdirectory is where the music files are stored. The $if2( causes the year to be the first one of “release date”, “original release date” found. If neither is present, the year is displayed as “0000”. The $left( takes only the year (i.e.: the first four digits) from the date for display.
- $if($gt( causes the track number to be prefaced by the disc number only if there are more than one disc in the album.
- $num( causes the track number to be padded to a two-digit number (i.e.: 01, 02, etc.) which allows proper sorting of the tracks in the directory.
- - %title% includes the track title in the file name, separated from the track number by a hyphen.
If you wanted each disc in a separate directory the script would change slightly as:
$upper($firstalphachar(%albumartistsort%,nonalpha="#"))/%albumartist%/$left($if2(%date%,%originaldate%,0000),4) - %album%/$if($gt(%totaldiscs%,1),Disc %discnumber%/,)$num(%tracknumber%,2) - %title%
I hope this helps move you a bit closer to what you’re wanting to accomplish. For more information about scripting in Picard, there’s https://picard.musicbrainz.org/docs/scripting/ and https://picard.musicbrainz.org/docs/tags/.
edit:
Also, just to clarify this goes in the file naming script section of the options as: