Looking for help with my file naming


#1

I Googled this, I follow the syntax just enough to almost understand, but I’m having an issue. This is the syntax I’m trying

$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),%album% - [$left(%date%,4)]/,)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%

It’s the default with the [$left(%date%,4)] added. In the example at the bottom it’s showing how I want is. Which is /artist/album [year]/track number - track name.mp3. Now in the syntax I’m seeing %albumartist% right after the directory / so I’m assuming that’s what needs to be removed. BUT, here’s where my confusion works. When I use the default naming, it comes out /track number - track name.mp3. When all I do is add [$left(%date%,4)] it’s populating the directory with the artist name.

I’m guessing even though the example under the syntax box looks right. I messed up the syntax somewhere, but I can’t figure it out. Since I use KODI for my music and never actually look at my directories any more. I just thought I’d leave it as it with no year in the folder name. But just so I can maybe start to understand the syntax a bit better I was hoping someone could show me what I did wrong.


#2

Your script looks like it should work. Which release (album) is it screwing up, and what is the resulting path and filename output? (One example of a “bad” one should be sufficient.)

To do what you’re after I think I would use something like this:

$if2(%albumartist%,%artist%)/%album% [$left($if2(%date%,%originalyear%,----),4)]/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2) $if(%_multiartist%,%artist% - ,)%title%

It’s almost identical to the script you have, but with a bit less checking regarding artists and a bit more regarding the date.


#3

I tested it on 10 albums, across 4 different artist. this is how the files looked before I ran MB

01-track.mp3

after MB with the exact syntax I posted all looked like this

artist name-01-track.mp3. I thought MAYBE I did something else to the syntax, so I reset it back to default then copy and pasted the code again, which I re-googled from here. And the same result. I was confused. I’ll try what you posted, thank you :slight_smile:


#4

This may sound like a dumb question, but you are matching your files up to a release from MusicBrainz in the right hand pane before saving, right?


#5

Not a dumb question at all, I’m clearly doing something wrong. Never used MB before the other day, I did read over a quick tutorial. I drag a folder to unclustered, then drag it to clustered, right click and hit lookup. Then when I get it to where the disc icon’s gold in the right panel I right click and hit save. I need to go read another tutorial because there’s something in my process that’s still wrong. I just did 4 albums from the same artist. MB found them all, all came up with gold icons and proper album name/artist when I hit lookup. But when I clicked save 2 of them renamed the files to 01-track and the other 2 artist name-01-track. I looked at the ID3s and don’t see anything that sticks out differently. So there’s something with my naming syntax, which is just the default at the moment. I did about 50 albums yesterday and it’s very random which get the naming I’m after and which have artist name before the track number. I’m going to go read up more on syntax and maybe then I can get an understanding of what’s going on.


#6

rdswift, your syntax worked perfectly for renaming the folder THANK YOU! I still don’t fully understand the logic, but it does just what I need so I’ll just stay ignorant lol.