Tools and other software MusicBrainz Picard - Script renaming/moving files ( no help / sharing only ) (1 Viewer)


Test Group
  • Team MediaPortal
  • May 10, 2007
    France - IDF
    Home Country
    France France

    i want to share my script for rename/move Audio files using Musicbrainz Picard.
    for information, an portable is available on, i use it for use it as portable and not lost my setting, because all settings are stored inside windows registry

    the convention is :

    --> %AlbumArtist%
            | ---> %Year% - %Album% [Extension file]
                      | ---> %DiscNumber%-%Track% - %Title% [%Artists% featuring without the %AlbumArtist%].ext
                      | ---> %Track% - %Title% [%Artists% featuring]
            | ---> %Title%.ext  (if music without album or extracted from album)
            | ---> %Artists% - %Title%.ext  (if music without album or extracted from album and have multi Artists)
    --> Various Artists
            | ---> %Album% [%ExtensionFile%]
                      | ---> %Artist% - %Title%.ext

    for sorting by albumartist, if the tag is missing you need to add it before save files.
    don't forget to remove album / track, if the file is alone or you want it

    for the discnumber before title, the tag " %totaldiscs% must be present, only use the %discnumber% will break the convention.

    Adapt the code to the Various Artists name from your setting :
    $set(_variousartist,Various Artists)

    if you see few error during renaming, you can includ for example : XXX1XXX before " %artist% -" for know what line is used for your files.

    the code is not perfect, and maybe need few correction,

    $noop( # set variable read for use in script )
    $set(multiartists3,$replace(%multiartists2%,%albumartist%; ,))
    $set(multiartists4,$replace(%multiartists3%,;, &))
    $set(_variousartist,Various Artists)
    $noop( if albumartist is not available, use artist as albumartist)
    $noop( check if the %albumartist% name = %artist%, if different it recognize the album as VariousArtist or Compilation)
    $noop( create an subfolder, only if tag contain album tag, else move it inside the Artist folder )
    $noop( new subfolder)
    $noop( if it is an album "artist  = albumartist" or  "artist  = contain "various artist" name" , date is added before the album name)
    $if($or($inmulti(%artists%,%albumartist%),$if($eq(%albumartist%,%_variousartist%),,1)),$if2($if(%originaldate%,$left(%originaldate%,4) - ,),$if(%date%,$left(%date%,4) - ,)))
    $noop( if Compilation, only use albumname as folder name)
    $noop( add extension file to the album name)
    $noop( new subfolder)
    $noop( check if the album contain many disc, if yes, the disc number is added before the track number)
    $if($gt(%totaldiscs%,1),$num(%discnumber%,1)-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) - ,)
    $noop(file name: various artiste : artist name + title track  OR Artistalbum + featuring , is keep the title track only as above +"feat. Artist name")
    $noop(file name Various artists : Artist  - title track    ---------------- TESTING LINE XXX1XXX  --------------- )
    $if($and($and($ne(%artist%,%albumartist%),$ne(%albumartist%,%_variousartist%)),$not($in(%artist%,%albumartist%))),%artist% - ,)
    $noop(file name Various Artists :  Artist - title track  ---------------- TESTING LINE XXX2XXX  ---------------)
    $if($and($and($ne(%artist%,%albumartist%),$eq(%albumartist%,%_variousartist%)),$not($in(%artist%,%albumartist%))),%artist% - ,)
    $noop(file name Various Artist :  Artist  - title track  ---------------- TESTING LINE XXX3XXX  ---------------)
    $if($and($and(%artists%,$if($in(%artist%,%albumartist%),,1)),$ne(%albumartist%,%_variousartist%)),%artist% - ,)
    $noop( mis de coté pour le moment)
    $noop(file name Artist album + artists avaiblable + no track number :  Artist  - title track ---------------- TESTING LINE XXX4XXX  ---------------)
    $if($and($and($and($not(%tracknumber%),$ne(%artists%,%artist%)),$in(%artist%,%albumartist%)),$ne(%albumartist%,%_variousartist%)),%artist% - ,)
    $noop( mis de coté pour le moment)
    $noop(file name : title track)
    $noop(file name Album Artist + featuring :   title track  [feat. xxx]  )
    $if($if($and($if($and($in(%artist%,%albumartist%),%artists%),1,),$if($eq(%artist%,%albumartist%),,1)),,1),, [feat. %multiartists4%])
    Last edited:


    Development Group
  • Team MediaPortal
  • September 15, 2004
    Vienna, Austria
    Home Country
    Austria Austria
    I am doing that with my own MPTagThat


    Users who are viewing this thread

    Top Bottom