Repository for neat file name string patterns and tagger script snippets

6 posts were merged into an existing topic: Help with refining picard script as well as how to sort radio and dj sets

7 posts were split to a new topic: Help for adjusting renaming script

I’ve run across a couple of scripts on here that use %SavePerfectAnyway%. I can’t find any documentation about what this variable or tag does or how to use it. Can anyone explain?

Example here:
[Repository for neat file name string patterns and tagger script snippets - #156 by tdiaz]

Beatport never seem to have Album Artist tags sorted so when you buy compilations from them you end up with messy folders. Pretty bad they ain’t sorted that in 20 years or so business.

14 posts were split to a new topic: Help with filenaming pattern

2 posts were split to a new topic: Help with getting disambiguation comment for file name

Hi, i still cant get your 2.7 to work.

is it simply adding it into the script section?
do i need to disable/enable any options?
or am i missing a plugin of some sort?

Other than the fm(dot) thing, if you choose to use that, there are no additional requirements.

Paste the content into the renaming script section and set things as you want them in the configuration block.

Start with a couple albums and singles. Open a filesystem window to directly see your target directory, [S] the album and watch what happens with it. Make changes in the config area, save again and whatever you did will change right there.

Though I also have a fair amount of additional tagger scripts that make setting up data to be sorted somewhat more efficient, they are not necessary at all. These are the section of $if and it finding specific tags and acting on them, and I use a Macro Engine to do the repetitive tasks.

Hi everybody :wink: !

I post here an update from MBP Magic Script By Ski-lleR
For me only but maybe usefull :slight_smile:
-could set where the [YEARS] go: right or left
-could disable bitrate,time to filename
-minors fix

1 Like

cannot post full text, sorry

Cannot post full text here : picard.pts - BayFiles

But :wink:

The “MBP YA Magic-Script” is really a big deal for my need, I must update the script to work.
It work great now.
But I do a verry easy script, with addon Additional Artists Variables, the result is the same like MPB:

$if($eq(%releasetype%,album), [Album]/,
$if($eq(%releasetype%,single), [Single]/,
$if($eq(%releasetype%,ep), [EP]/,
$if($eq(%releasetype%,broadcast), [FM]/,
$if($eq(%releasetype%,other), [Other]/,
$if($inmulti(%releasetype%,dj-mix), [DJ Mix]/,
$if($inmulti(%releasetype%,remix), [Remix]/,
$if($inmulti(%releasetype%,soundtrack), [OST]/,
$if($inmulti(%releasetype%,live), [Live]/,
$if($inmulti(%releasetype%,mixtape/street), [Mixtape]/,
$if($inmulti(%releasetype%,compilation), [Compilation]/,)))))))))))

$if($if2(%date%,%originalyear%,%originaldate%),[$left($if2(%date%,%originalyear%,%originaldate%),4)] ,)
$if($gt(%totaldiscs%,1),%discnumber%,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - ,)$if($if2(%_albumartists%,%artist%,),$if2(%_albumartists%,%artist%,) - ,)%title%
1 Like

Updated both Scripts: 1. Saving from missing Files to an extra Folder is now working perfect. 2. Updated Normal Script saving to alphanumeric subfolders like A/, B/ and so on. Because anything without alphanumeric characters was just saved to the Folder #, i changed that part. If no alphanumeric album artist or artist name (in the case of various artists, album name) is found it just uses the first number, kanji, charakter or whatever it is and create that folder (like 1/ , 8/, ♂/). Just be shure that windows has other language packages installed and can write them. :slight_smile:

Hey there, because Music Brainz Picard Version 2.7 (beta) now supports more than one script i made use of it. I´m Tagging Collections seperately with Foobar2000 with the Tags Collection and Collectiontyp (just select all Files, go to properties, right click, add Tag. The good thing is the search engine in Foobar2000 to find anything for an collection) and than use these Tags in an second script with Music Brainz Picard.

I think that would work for Audio Books, DJ Mixes and the Like aswell because you use your personal Tags as base. :slight_smile:

It sorts out Dupes, Incompletes and even Missing Files that cant be found on MusicBrainz, so manually saving is possible.

Collection Script:







%originalyear% - $left(%album%,60)/
$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)-)$num(%tracknumber%,3) $left(%title%,60),

%date% - $left(%album%,60)/
$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)-)$num(%tracknumber%,3) $left(%title%,60))

My Normal Script looks like this and goes more into detail with Sorting, so feel free to combine them or so






$left($if2(%albumartist%, %artist%),50)/
$upper($firstalphachar($if2(%album%, %albumsort%),$if(%musicbrainz_albumid%,$left(%albumartist%,1),)))/
$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)-)$num(%tracknumber%,3) $left(%title%,60),

$upper($firstalphachar($if2(%albumartist%, %artist%),$if(%musicbrainz_albumid%,$left(%albumartist%,1),)))/
$left($if2(%albumartist%, %artist%),60)/
$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)-)$num(%tracknumber%,3) $left(%title%,60))

As a little example: I am tagging the “collectiontyp” Tag with the Tags Compilations, Discographies, Recordlabel, Soundtracks or Divers so adding something like Audiobooks or DJ Mixes as an collectiontyp would be possible.
For the Tag “collection” i am using something like Harry Potter (that would be collectiontyp Soundtracks) or Das Modul (that would be the collectiontyp Discographies) and so on.

1 Like

I tried adding the bitrate to the album directory name (to have multiple directories if i have different bitrate versions of the same album) but for some reason its completely ignoring it.
I tried adding to the Album directory extension

$if($eq(%_albumLevelTypeSeparation%,1),$if($eq(%_albumNameAtTypeSeparation%,1),%_albumForFilename%,)$if($eq(%_addBitRate%,1), %_fileVBRRate%%_fileCBRRate% %_bitRateType%)$upper( %_extension%)-%_fileCBRRate%%_fileVBRRate%)/

or to the _rootLevelTypeSeparation


but neither has any effect I can see.

I assume its a a stupid beginner’s error, but I cant seem to find it…

Thanks for any pointers

Edit: I found it, was indeed a stupid error.

Thanks for the excellent script, it has vastly improved my organization of files.

Ignore below, I changed the tag in Picard and that sorted it. Other artists seem okay, was just that one

One preference I am struggling with is that I would like to remove the leading "The ", but then sort by first letter of firstname, so “The Alan Parsons Project” becomes “Alan Parsons Project, The”.
I have changed “orderTypeForArtist” but cannot end up with my preferred option.

I tried manipulating the code, but my programming skills are not up to the task.
Is this possible, or am I stuck with “Parsons, Alan, Project, The”.

Thanks again for your script, it really is a big aid to mere mortals like myself.

HI Tdiaz, You’re the author of the magic script right?
First what a brilliant script, thank you.
Theres just one issue for me and i’ve been scratching my head for an hour trying to make it work. When the item is a compilation, or soundtrack etc I dont want the alphabetical sorted subdirectories. e.g Various\Album_name (not Various\A\Album_name)
Is that possible?


I’m looking to try and use the ‘magic script’ to start the process of organising my music from multiple sources, HDD’s, USB’s etc. I’m planning to dump everything into a NAS, and i’ve been through some of the older posts for as much info as I can find regarding this.
Just wanted to confirm its still only possible to use this script if you build from the source code as per “Plugin Capabilities & a 'fix' (Q&D hack) for dealing with duplicate files in the album directory”.
Do I need to use a specific build version or is the current build ok?
Also, how difficult a process is this for a relatively newbie with Picard?

Thanks in advance

1 Like

This is a great question…I would like to know too. For me, I consider a song a duplicate as Album + MB ID (song id?) + Acoustic Fingerprint. I have songs that are on multiple albums that are the same but I do not consider them duplicates. Can Picard do this?

Whatever happened to the list of pre-made scripts that was here? This redirects to the current documentation (which is as it should be), but I couldn’t find the actual scripts there.

Update, I think I found it here: Scripts — MusicBrainz Picard v2.7.3 documentation
I was looking here: Scripting — MusicBrainz Picard v2.7.3 documentation

Hello, my last and all day script:

[$left($if2(%originaldate%,%originalyear%,%date%,0000),4)] $if2($if(%albumartist%,%album%,),NO-ALBUM)
$if($gt(%totaldiscs%,1),Disc%discnumber%/,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - ,)$if($if2(%_artists_track_all_cred%,%_artists_track_primary_std%,%_albumartists%,%artist%,),$if2(%_artists_track_all_cred%,%_artists_track_primary_std%,%_albumartists%,%artist%,) - ,)%title%

Easy and quickly rename like this:
/Music/Arstist/[Releasetype]/[Year] Album Name/Disc1/track number - Singers - title.ext


/Musique/Bruno Mars/[ALBUM]/[2010] Doo-Wops & Hooligans/01 - Bruno Mars - Grenade.mp3
/Musique/Depeche Mode/[COMPILATION]/[2006] The Complete Depeche Mode/Disc16/21 - Depeche Mode - Everything Counts (live).mp3
/Musique/Eminem/[MIXTAPE_STREET]/[2010] A Beautiful Mind/02 - Eminem feat. Nicki Minaj - Roman’s Revenge.mp3


(post deleted by author)

1 Like