Move feat. to filename

Hello guys!

Please help! I need to rename the filename from tags considering "feat." string from %Artist% field. Values from %Artist% could be:

  1. String
  2. String feat. String2
  3. String feat. String2, String3, StringN & String N+1

What I want to achieve into filename based on the options above is:

1:
FROM: 2Pac - How Do U Want It
TO: 05. How Do U Want It
2:
FROM: 2Pac feat. KC - How Do U Want It
TO: 05. How Do U Want It (feat. KC)
3:
FROM: 2Pac feat. KC & Jojo - How Do U Want It
TO: 05. How Do U Want It (feat. KC & Jojo)

where 05 is value from %track%
Basically I need to create this pattern in filename: %track%. %title% (but considering to add feat. information from artist to filename.

Regards!
Daniel

What exactly is the current content in ARTIST for your 3 examples?

As far as I understand you want to combine
%TRACK%. %TITLE% and add a part from ARTIST

Therefore we need to see what exactly you have actually in ARTIST.

hello!

In Artist I have exactly what I've wrote in "FROM".
eg: 2Pac or
2Pac feat. KC - How Do U Want It or
2Pac feat. KC & Jojo - How Do U Want It

Regards!

Just to be clear - you want to add all of that detail specifically into the _FILENAME itself, and not into a part of the TITLE or some other component of the metadata? Often this can lead to introducing some invalid filename characters.

From your examples it isn't really clear. It is always best to post a screenshot of these in mp3tag for some files you want to change.

I just want to rename de _filename using tags values like this:
%track%. %title% (feat. part if any, if not should have just title)

You can use the Converter Tag - Filename with a string like this;
Format String: %track%. %title%[ feat. %mixartist%]

The parts contained within the square brackets is only processed if any placeholder contents exist for each file. [ feat. %mixartist%]
Note that the Converter does show you a preview, so you can see the changes expected.

If you haven't separated the %artist% and %mixartist% details you may want to consider that for simplifying this. So your example artist "2Pac feat. KC & Jojo" would then become:
ARTIST; 2Pac
MIXARTIST; KC & Jojo
There are many threads here that explain in more detail how this can be done.

I've done it by formating value of _FILENAME like this:
$ifgreater($strstr($lower(%artist%), 'feat.'),0,%track%. %title% $regexp(%artist%,(.*) feat. (.*),'('feat. $2')'),%track%. %title%)

:slight_smile: thanks a lot!

Would you mind to explain how your last format string works?

There is usually more than one way to achieve a result. If your current method gets what you want, then that is great.

But I suggest a more generic and simple solution that is easier to manage for future results as well, rather than something that only works on one or two very specific conditions.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.