Remove Underscores & Put Featured Artist Last

filenaming
tagging
Tags: #<Tag:0x00007f6467569bb8> #<Tag:0x00007f6467569a28>

#1

I am trying to get rid of the _ in my titles and also put the featured artists last to help with my sorting. I just have songs in mood folder and not by album, as I have very few albums and like to listen to music by the mood I am in.

Current Layout: %artist% - %album% - %title%

2Pac - Makaveli 4_ Vengeance - Untouchable Freestyle

Desired Outcome = 2Pac - Makaveli 4 Vengeance - Untouchable Freestyle (feat. other artist name)

Any suggestions on how to correct this would be greatly appreciated.


#3

The underscores are added for characters not allowed in Windows filenames. You can either completely remove them or set them to something different with scripting. Try doing something like this in your filenaming script:

$set(artist,$rreplace(%artist%,["*:<>?|],))
$set(album,$rreplace(%album%,["*:<>?|],))
$set(title,$rreplace(%title%,["*:<>?|],))

This will replace the characters "*:<>?| with nothing.

Install and activate the “Feat. Artists in Titles” plugin. This will make featuring part of %title% and you will get something like:

2Pac - Pac’s Life - Whatz Next (feat. A3 & Jay Rock)


#4

If you have already tagged everything up using MusicBrainz, the Picard is the key as described above.

Or, if you are just shuffling file names around based on tags, MP3TAG ( mp3tag.de ) is a very good bulk renamer of tracks. It can read current tags and use them to change the names of your files in the exact format you are asking for.


#5

and Jaikoz can do this also, it uses Javascript expressions so you are not limited to a predefined set of functions like some solutions


#6

Can you please share what the final code looks like? I tried adding this after each section and it did not work.


#7

Can anyone please help me with this final code layout?


#8

Does anyone have any suggestions on this code? I have read several posts and can’t find a way to make this work without errors.


#9

What is the script that you are using, and what error are you getting?


#10

If I paste the above recommended code into the file naming box, it doesn’t show an error, but it produces no name for the finished converted file.


#11

You have two options here:

  1. You put the above in your file naming script at the top (it must be before you use these variables)

  2. Instead of putting it in the file naming you set it up in Options > Scripting, but instead of changing the variables directly you create separate hidden variables just for filenaming (otherwise you will also change the values in the tags, and you probably want to keep the special characters there). Something like this in Options > Scripting:

    $set(_artist,$rreplace(%artist%,["*:<>?|],))
    $set(_album,$rreplace(%album%,["*:<>?|],))
    $set(_title,$rreplace(%title%,["*:<>?|],))
    

    Now in your file naming script you use %_artist% instead of %artist%. The underscore in front of the names makes these variables hidden, which prevents them from being written to the file tags.

I personally prefer option 2, because it keeps your file naming script clean. There is one downside to this approach: Any changes you do manually do to the tags won’t be used for saving. If you frequently change tags manually you should maybe go with option 1.


#12

Thank You!!! option 2 worked perfectly. Now is there any option to add the featured artist last in prentices? I have the “Feat. Artists in Titles” plugin installed and it puts it after the artist name.

I would like it to look like this sample below:

2Pac - Makaveli 4 Vengeance - Untouchable Freestyle (feat. other artist name)