Another annoying newbie asking for help to sort


#1

can someone please help me write something to achieve this:

A/the Artist Name/Year/Album/song Number/songname

for the filename i just want -song number/songname

-problem is that i have the same album in mp3 and flac formats and now they are all mixed into one folder
-problem two is sometimes there are multiple version of same album
ie ‘the wall’ and ‘the wall remastered’ and ‘the wall 24 bit…’ and mp3 and flac for each, I want them all in separate album folder
-problem 3 is sometimes album or artist or filename gets cut off because there isn’t enough allowed character

i don’t know how to write the scripting language, i just cobbled together part of different script i found online. I really appreciate any help.

this is what i had

$if($eq(%musicbrainz_albumartistid%,89ad4ac3-39f7-470e-963a-56509c546377),

$left($if2(%albumartistsort%, %artistsort%),30)/
$if(%date%,$left(%date%,4)) - $left(%album%,70) \(%releasestatus%-%releasetype%\)/
$left(%album%,60) \(%releasestatus%-%releasetype%\)-$if($gt(%totaldiscs%,1),$if2(%media%,CD)%discnumber%-,)$num(%tracknumber%,2)-$left(%title%,30)

,
$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))
/$left($if2(%albumartistsort%, %artistsort%),18)/
$if(%date%,$left(%date%,4)) - $left(%album%,70) /
$left(%album%,30) -$if($gt(%totaldiscs%,1),$if2(CD)%discnumber%-,)$num(%tracknumber%,2)-$left(%title%,30)

)

#2

This is an possible filenaming example:
%_extension%/$if2(%albumartistsort%,%artistsort%)/%originaldate%-%album% [%date% - %releasecountry% - %label% - %catalognumber% - %barcode% - %media%]/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2)$if(%compilation%, %artistsort% -,) %title%

With “%_extension%/” you get separate folders for mp3/flac/ogg/whatever

With [%date% - %releasecountry% - %label% - %catalognumber% - %barcode% - %media%] you get for most releases a unique (and human readable) folder. If human readability isn’t important to you, you can use the %musicbrainz_albumid%

This will produce folders like:

Pink Floyd
Pink Floyd/1967-07-07-The Piper at the Gates of Dawn [1994-10-01 - GB - EMI - 7243 8 31261 2 5; CDEMD 1073 - 724383126125 - CD]
Pink Floyd/1967-07-07-The Piper at the Gates of Dawn [1994-10-17 - XE - EMI United Kingdom - 7243 8 31261 2 5 - 724383126125 - CD]
Pink Floyd/1969-10-25-Ummagumma [1994 - GB - EMI United Kingdom - 7243 8 3120 2 2; CDEMD 1074 - 724383120222 - CD]
Pink Floyd/1970-10-10-Atom Heart Mother [2011-09-26 - XE - EMI - 50999 028940 2 7 - 5099902894027 - CD]
Pink Floyd/1971-05-14-Relics [1995 - GB - EMI - 7243 8 35603 2 5 - 724383560325 - CD]
Pink Floyd/1971-10-30-Meddle [2011 - XE - Parlophone - 50999 028942 2 5 - 5099902894225 - CD]
Pink Floyd/1973-03-24-The Dark Side of the Moon [2003-03-31 - GB - EMI - 7243 582136 2 1 - 724358213621 - Hybrid SACD]
Pink Floyd/1973-03-24-The Dark Side of the Moon [2011-09-26 - XE - EMI - 50999 028955 2 9 - 5099902895529 - CD]
Pink Floyd/1975-09-12-Wish You Were Here [1994-07 - GB - EMI - 7243 8 29750 2 1; CDEMD 1062 - 724382975021 - CD]
Pink Floyd/1975-09-12-Wish You Were Here [2011-09-26 - XE - Parlophone - 50999 028945 2 2 - 5099902894522 - CD]
Pink Floyd/1977-01-23-Animals [1994 - GB - EMI United Kingdom - 7243 8 29748 2 6; CDEMD 1060 - 724382974826 - CD]
Pink Floyd/1977-01-23-Animals [1994 - XE - EMI; EMI United Kingdom - 7243 8 29748 2 6; CDEMD 1060 - 724382974826 - CD]
Pink Floyd/1977-01-23-Animals [2011 - XE - Parlophone - 50999 028951 2 3 - 5099902895123 - CD]
Pink Floyd/1979-11-30-The Wall [2016-01-15 - XE - Pink Floyd Records - PFR11 - 5099902894423 - CD]
Pink Floyd/1994-03-28-The Division Bell [2011-09-23 - AT - EMI - 50999 028961 2 0 - 5099902896120 - CD]
Pink Floyd/1995-05-29-Pulse [2000 - GB - EMI - 7243 4 91436 2 3 - 724349143623 - CD]
Pink Floyd/2011-09-27-A Foot in the Door_ The Best of Pink Floyd [2011-11-07 - XE - EMI - 50999 028966 2 5 - 5099902896625 - CD]
Pink Floyd/2016-11-11-The Early Years_ 1967–1972_ Cre_ation [2016-11-16 - XE - Parlophone; Pink Floyd Records - 0190295928049; PFREY8 - 190295928049 - CD]

An nice documentation about all possible tags you can find here:
https://picard.musicbrainz.org/docs/tags/
https://picard.musicbrainz.org/docs/mappings/


#3

Thank you very much for taking the time to help. Will this keep the main folders as well-ex a/b/c…


#4

I appreciate the help and i tried what you wrote but its not exactly what I’m looking for. i dont want a main folder just for all mp3, rather i would like separate folders for flac and mp3 inside the album year folder

this is the structure i would like to end up with

A/
Artist Name /
release Year/
Album name/
for the filename i just want song number and song name

ex
P/
Pink Floyd/
1979/
The Wall.flac
The Wall.mp3