Never considered including functions so perhaps these ridiculously long masks could be done much much easier, but I’ve significantly retooled my masks since the last time I posted and thought I’d repaste them now.
Folder Rename Mask: ```(artist.length>0 ? whichartist = artist : (albumartist.length>0 ? whichartist = albumartist : whichartist = ‘noartist’));
artistmod = whichartist;
while (artistmod.charAt(artistmod.length-1) == “.”) {artistmod = artistmod.substring(0,(artistmod.length-1));};
albummod = album;
while (albummod.charAt(albummod.length-1) == “.” ) {albummod = albummod.substring(0,(albummod.length-1));};
(artistmod + folderseparator) + (originalyear.length>0 ? ‘(’ + originalyear.substring(0,4) + ') ’ : (year.length>0 ? ‘(’ + year.substring(0,4) + ') ’ : ‘’)) + (album.length>0 ? whichartist : artistmod) + (album.length>0 && (albumartist.length>0 || artist.length>0) ? ’ - ’ : ‘’) + (albummod)
File Rename Mask: ```PersonalMax=190;
Fills=12; //2 slash's, 6 for year, 3 for seperation of artist/album
(albumartist.length>0 ? WhichArtist = albumartist : (artist.length>0 ? WhichArtist = artist : WhichArtist = 'noartist'));
(artist.length>0 ? RWhichArtist = artist : (albumartist.length>0 ? RWhichArtist = albumartist : RWhichArtist = 'noartist'));
PreTitle=RWhichArtist.length + WhichArtist.length + album.length + Fills;
ForFileName=PersonalMax - PreTitle;
FullSum=title.length + album.length + WhichArtist.length + 13;
NoAlbumSum=title.length + WhichArtist.length + 10;
TitleTrackSum=title.length + 7;
(TitleTrackSum>ForFileName ? (
\tWhatToCut=TitleTrackSum-ForFileName+3,
\tNewAlbum='',
\tNewArtist='',
\tNewTitle=title.substring(0,(title.length-WhatToCut)) + '...'
\t) : (
\t\tNoAlbumSum>ForFileName ? (
\t\tWhatToCut=NoAlbumSum-ForFileName+3,
\t\tNewAlbum='',
\t\tNewArtist=WhichArtist.substring(0,(WhichArtist.length-WhatToCut)) + '...',
\t\tNewTitle=title + ' - '
\t\t) : (
\t\t\tFullSum>ForFileName ? (
\t\t\tWhatToCut=FullSum-ForFileName+3,
\t\t\tNewAlbum=album.substring(0,(album.length-WhatToCut)) + '...',
\t\t\tNewArtist=WhichArtist + ' - ',
\t\t\tNewTitle=title + ' - '
\t\t\t) : (
\t\t\t\tWhatToCut='',
\t\t\t\tNewAlbum=album,
\t\t\t\tNewArtist=WhichArtist + ' - ',
\t\t\t\tNewTitle=title + ' - ')
\t\t)
\t)
);
(disctotal>1 ? discno + '-': '') + (trackno.length>0 ? trackno + ' - ': '') + (title.length>0 ? NewTitle : '') + NewArtist + (album.length>0 ? NewAlbum : '')
Compilation Folder Rename Mask: ```(albumartist.length>0 ? whichartist = albumartist : (artist.length>0 ? whichartist = artist : whichartist = ‘noartist’));
artistmod = whichartist;
while (artistmod.charAt(artistmod.length-1) == “.”) {artistmod = artistmod.substring(0,(artistmod.length-1));};
albummod = album;
while (albummod.charAt(albummod.length-1) == “.” ) {albummod = albummod.substring(0,(albummod.length-1));};
(artistmod + folderseparator) + (year.length>0 ? ‘(’ + year.substring(0,4) + ') ’ : (originalyear.length>0 ? ‘(’ + originalyear.substring(0,4) + ') ’ : ‘’)) + (album.length>0 ? whichartist : artistmod) + (album.length>0 && (albumartist.length>0 || artist.length>0) ? ’ - ’ : ‘’) + (albummod)
Compilation File Rename Mask: ```PersonalMax=190;
Fills=12; //2 slash's, 6 for year, 3 for seperation of artist/album
(artist.length>0 ? WhichArtist = artist : (albumartist.length>0 ? WhichArtist = albumartist : WhichArtist = 'noartist'));
(albumartist.length>0 ? RWhichArtist = albumartist : (albumartist.length>0 ? RWhichArtist = albumartist : RWhichArtist = 'noartist'));
PreTitle=2*RWhichArtist.length + album.length + Fills;
ForFileName=PersonalMax - PreTitle;
FullSum=title.length + album.length + WhichArtist.length + 13;
NoAlbumSum=title.length + WhichArtist.length + 10;
TitleTrackSum=title.length + 7;
(TitleTrackSum>ForFileName ? (
\tWhatToCut=TitleTrackSum-ForFileName+3,
\tNewAlbum='',
\tNewArtist='',
\tNewTitle=title.substring(0,(title.length-WhatToCut)) + '...'
\t) : (
\t\tNoAlbumSum>ForFileName ? (
\t\tWhatToCut=NoAlbumSum-ForFileName+3,
\t\tNewAlbum='',
\t\tNewArtist=WhichArtist.substring(0,(WhichArtist.length-WhatToCut)) + '...',
\t\tNewTitle=title + ' - '
\t\t) : (
\t\t\tFullSum>ForFileName ? (
\t\t\tWhatToCut=FullSum-ForFileName+3,
\t\t\tNewAlbum=album.substring(0,(album.length-WhatToCut)) + '...',
\t\t\tNewArtist=WhichArtist + ' - ',
\t\t\tNewTitle=title + ' - '
\t\t\t) : (
\t\t\t\tWhatToCut='',
\t\t\t\tNewAlbum=album,
\t\t\t\tNewArtist=WhichArtist + ' - ',
\t\t\t\tNewTitle=title + ' - ')
\t\t)
\t)
);
(disctotal>1 ? discno + '-': '') + (trackno.length>0 ? trackno + ' - ': '') + (title.length>0 ? NewTitle : '') + NewArtist + (album.length>0 ? NewAlbum : '')
Essentially I fix my music on a Mac, store it on a Linux box and access it on Mac OSX and PC’s so interoperability was paramount. The Folder rename masks make sure that a folder name never ends in a period, whcih causes issues on PC (its autofixed if you tag them with Jaikoz ON a PC, but not when they are created on a Mac). The File rename masks make sure that the resulting file doesn’t become too long to display on PC’s by first removing/shortening the album part of the filename (which comes last), then the artist/albumartist field (which is 2nd to last) and then shortens the title depending on how much the file needs to be shortened. It’s likely this could’ve been done easier with functions but I didn’t realize that functionality until I went here to post my new masks and, frankly, am not that great of a coder to begin with. Anyways, hope this helps somebody out, feel free to ask me any questions.