Repository for neat file name string patterns and tagger script snippets

@rdswift This didn’t seem to work for me. I tried inserting it in several places but it didn’t seem to change the output. I very well could be doing it wrong though as this is all new to me and there is a steep learning curve it seems. haha

Here is the code I’m currently using which is pretty much the default:

$if2(%albumartist%,%artist%)/
$if(%albumartist%,%album%/,)
$if($gt(%totaldiscs%,1),%discnumber%-,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - ,)$if(%_multiartist%,%artist% - ,)%title% ```

Try the following:

$if2(%albumartist%,%artist%)/
$if(%albumartist%,%album%/,)
$if($gt(%totaldiscs%,1),%discnumber%-,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - ,)%_artists_track_primary_cred%$if(%_artists_track_additional_cred%, feat. %_artists_track_additional_cred%,) - %title%

If that works, then you should be able to see where we made the changes.

1 Like

@rdswift This kind of worked. It got the correct formatting but didn’t insert the artist/s between the two -.

Output looks like: 01 - - song name.mp3

It sounds like you don’t have the Additional Artists Variables plugin installed and activated.

2 Likes

@rdswift Yep, your exactly right. I had that plugin installed but didn’t activate it as I thought it activated automatically. My bad. haha This is working now so thanks a bunch. I honestly would have never figured that out.

5 posts were split to a new topic: Help getting started with scripting

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:

$if2(%_artists_album_primary_cred%,%artist%)
/
$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(%albumartist%,%album%,)
/
$if($gt(%totaldiscs%,1),%discnumber%,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) - ,)$if($if2(%_albumartists%,%artist%,),$if2(%_albumartists%,%artist%,) - ,)%title%

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:

/Collections/


$get(collectiontyp)/
$get(collection)/



$get(_extension)/



$if($is_complete(),,

$if($lt($matchedtracks(),%_totalalbumtracks%),_Incomplete/,$if(%musicbrainz_albumid%,_Dupes/,_Missing/)))



$if(%musicbrainz_artistid%,

%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

MusicBrainz/



$get(_extension)/



$if($is_complete(),,

$if($lt($matchedtracks(),%_totalalbumtracks%),_Incomplete/,$if(%musicbrainz_albumid%,_Dupes/,_Missing/)))



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

$left($if2(%albumartist%, %artist%),50)/
$upper($firstalphachar($if2(%album%, %albumsort%),$if(%musicbrainz_albumid%,$left(%albumartist%,1),)))/
$left(%album%,60)/
$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)/
$left(%album%,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

$if($eq(%_rootLevelTypeSeparation%,1),$upper(%_extension%)-%_fileVBRRate%%_fileCBRRate%,)

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.

tdiaz,
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.