Skip to content

Instantly share code, notes, and snippets.

@elliotchance
Last active April 19, 2026 14:53
Show Gist options
  • Select an option

  • Save elliotchance/29d073897a7daa6acf59973edfa1b3fd to your computer and use it in GitHub Desktop.

Select an option

Save elliotchance/29d073897a7daa6acf59973edfa1b3fd to your computer and use it in GitHub Desktop.
MusicBrainz Picard

Examples

The same release in different versions uses annotation:

  • Albums/Electric Callboy - TEKKNO (CD, 2022)/07 Electric Callboy - Parasite.flac
  • Albums/Electric Callboy - TEKKNO (CD, 2023, Tour Edition)/01 Electric Callboy - Pump It.flac

Only use the first (primary) artist for the folder, but retain multiple artists on the album folder (this keeps all releases from the same primary artist together):

  • Albums/Gareth Emery & Standerwick feat. HALIENE - Saving Light (Digital Media, Single, 2017)/Saving Light.flac

Track artists are retained:

  • Artists/Adventure Club/Adventure Club - Calling All Heroes (Digital Media, EP, 2013)/02 Adventure Club feat. The Kite String Tangle - Wonder.flac
  • Artists/Adventure Club/Adventure Club - Calling All Heroes (Digital Media, EP, 2013)/04 Adventure Club - Thunderclap.flac
  • Artists/Armin van Buuren/Armin van Buuren - Armin van Buuren 001_ A State of Trance (CD, 2000, Compilation, DJ Mix)/1-03 John Johnson - Impact (Van Bellen remix).flac

Compilations (Various Artists) are placed in a different root:

  • Compilations/The Fire This Time (CD, 2002, Compilation)/1-04 Soma - Get Thee Behind Me.flac

Groupings are also kept in a separate root folder with optional series number for ordering:

  • Groupings/Anjuna25/Alex Sonata & TheRio - 25 Years of Anjuna Mixed by Alex Sonata & TheRio (Digital Media, 2025, Compilation, DJ Mix)/2-04 Cramp - RU116 (Cramp 2020 mix).flac
  • Groupings/Dream Dance/0015 Various Artists - Dream Dance, Vol. 15 (CD, 2000, Compilation)/1-01 Miss Shiva - Dreams (single cut).flac

Instructions

  1. Fill in My Script
  2. Fill in File Naming
  3. Enable Settings > Metadata > Use release relationships
  4. File Naming > Compatability > Enable: Allow paths longer than 259 characters

Usage

For the most part everything works except when you add a grouping you need to right clikc on the album and run the script again for the File Naming to be correct.

%_f1%/%_f2%/%_f3%/%media% %_discnumber%$if(%discsubtitle%, - %discsubtitle%,)/
%_discnumber%-%_tracknumber% $if(%_multiartist%,%artist% - ,)%title%
$if(%_originalalbum%,$set(album,%_originalalbum%),$set(_originalalbum,%album%))
$set(_discnumber,%discnumber%)
$if($gt(%totaldiscs%,9),$set(_discnumber,$pad(%discnumber%,2,0)))
$if($gt(%totaldiscs%,99),$set(_discnumber,$pad(%discnumber%,3,0)))
$set(_tracknumber,%tracknumber%)
$if($gt(%totaltracks%,9),$set(_tracknumber,$pad(%tracknumber%,2,0)))
$if($gt(%totaltracks%,99),$set(_tracknumber,$pad(%tracknumber%,3,0)))
$set(_info,%media%\, %_primaryreleasetype%\, $year(%date%)\, %_secondaryreleasetype%)
$set(_info,$replace(%_info%,;,\,))
$set(_info,$replace(%_info%,audiobook,Audiobook))
$set(_info,$replace(%_info%,compilation,Compilation))
$set(_info,$replace(%_info%,dj-mix,DJ Mix))
$set(_info,$replace(%_info%,interview,Interview))
$set(_info,$replace(%_info%,live,Live))
$set(_info,$replace(%_info%,mixtape/street,Mixtape))
$set(_info,$replace(%_info%,remix,Remix))
$set(_info,$replace(%_info%,soundtrack,Soundtrack))
$set(_info,$replace(%_info%,spokenword,Spokenword))
$set(_info,$replace(%_info%,album,Album))
$set(_info,$replace(%_info%,single,Single))
$set(_info,$replace(%_info%,ep,EP))
$set(_info,$replace(%_info%,broadcast,Broadcast))
$set(_info,$replace(%_info%,other,Other))
$set(_info,$replace(%_info%,\, \, ,\, ))
$set(_info,$trim(%_info%,\, ))
$if(%_releasecomment%,
$set(album,%album% \(%_info%\, %_releasecomment%\)),
$set(album,%album% \(%_info%\))
)
$set(_f1,Albums)
$set(_f2,$if2(%genre%,Unknown Genre))
$set(_f3,%albumartist% - %album%)
$if($eq(%compilation%,1),
$set(_f1,Compilations)
$set(_f2,%album%)
$set(_f3,)
)
$if(%grouping%,
$set(_f1,Groupings)
$set(_f2,%grouping%)
$set(_f3,$if(%_releasegroup_seriesnumber%,$pad(%_releasegroup_seriesnumber%,4,0) )%albumartist% - %album%)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment