Renaming Artist Name being cut off

So the problem I’m having is that when renaming things the Artist name is being cut off. For example Florence and the Machine is being renamed to a folder called Florence and the M. I thought maybe there was something set to keep the folders at a set length but I can’t find anything that would do that. In the application it show the correct rename so i’m not sure what is causing this. Post my rename script below in case that’s what is causing it, but I just took one from the site so not sure why it would.

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

$left($if2(%albumartistsort%, %artistsort%),40)/

$if(%date%,$left(%date%,4)) - $left(%album%,40) (%releasestatus%-%releasetype%)/

$if($gt(%totaldiscs%,1),$if2(%media%,CD)%discnumber%-,)$num(%tracknumber%,2)-$left(%title%,30)

,

$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))

/$left($if2(%albumartistsort%, %artistsort%),18)/

$if(%date%,$left(%date%,4)) - $left(%album%,40) (%releasestatus%-%releasetype%)/

$if($gt(%totaldiscs%,1),$if2(%media%,CD)%discnumber%-,)$num(%tracknumber%,2)-$left(%title%,30)

)

All of those pieces that say $left(…,#) are truncating what’s in them to that length. It’s probably the sort tag truncated to 18 that’s getting you.

4 Likes

Thanks for the quick reply. Do I need to have a value there or can I remove the ,18?

If you want that folder to be limited in length, you need to have some number there. It’s probably a good idea on principle because filenames that are too long cause all kinds of issues. But if you don’t care or don’t think any folder names will be excessively long, you could take out the whole $left function at that spot.

2 Likes

Awesome that was it. Removed that function and it is working correctly now. Thank you very much for your help.

1 Like