Shifting any word based on dividers. Is it possible?

Have finally got clean mp3s after my yesterdays attempt to find solution, which the generous member here helped me get.

now I have mp3s in this format mainly,

01 - Artist 1 - Title (Original Mix) (feat. Artist 2).mp3

thats the case in all the files.

As you can see there are 2 dividers.

I would want to achieve all the mp3s like this please.

01 - Artist 1 feat. Artist 2 - Title (Original Mix).mp3

*the feat. artist is always inside ( & ).
*the feat. is always feat.
*Format of tracks is TrackNumber Space Divider Space Artist1 Space Divider Space TitleOfTrack
*Its not necessary that (feat. XXXX) is at the end of filename. It can be anywhere in between also.

Can it be achieved?

Thanks for reading.

Best regards,

Why do you fiddle about with the filenames?
Transfer the data to the tags first and then see e.g. this thread:
/t/11096/1
It deals with a lot of occurances of featuring artists.

Thanks. I read it. But I dont know what regex to use in my case.

Have you transferred the data to tags?

Yes original tags looks like this,
Artist: Mark Jous
Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)

REGEX I am using is : $regexp(%artist%,$1,1) $mid(%title%,$strstr($lower(%title%),feat.),999) - $regexp(%title%,$1,1)

After result,
Artist: Mark Jous feat. Eufonic)
Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)

Desired,
Artist: Mark Jous feat. Eufonic
Title: Sandra (Courage & Evenfall Remix)

The regexp look overly complicated to me.
Check out the possibilities of a helper fields and guess value actions:
Move "Featuring" from Artist to Title

I couldnt get what this link says.

Regex I tried my best to arrange in this order. Sorry not that into technicality sire. Please suggest a solution as per my case.

EDIT :-

$regexp(%artist%,(.),$1) $mid(%title%,$strstr($lower(%title%),feat.),999) - $regexp(%title%,(.) ((.*)),$1,1)

Worked.

Now the new tags are fine.

Earlier :
Artist : Mark Jous
Title : Sandra (feat. Eufonic)

Now after the regex it looks like,
Artist : Mark Jous feat. Eufonic)
Title : Sandra

Now I need to know the way to remove parenthesis after Eufonic that I am getting. Dont know how to remove that. What to add in the regex above?

Create an action of the type "Guess value" for %title%
Guessing pattern: %title% (feat. %featartist%)

Create an action of the type "Format value" for ARTIST
Format string: %artist% feat. %featartist%

Delete user-defined field FEATARTIST

GUESS code just adds (feat.) at the end of title. What am i doing wrong?

I don't know.
Perhaps spelling, case?
It works with the given example.

Sorry for the late reply.

It worked!!

How to do with these kind of examples?

ARTIST = Dirtcaps
TRACK = Foreign Tongues (feat. Eleni Drake) (Acoustic Version)

DESIRED
ARTIST = Dirtcaps feat. Eleni Drake
TITLE = Foreign Tongues (Acoustic Version)

Thanks and best regards,
:slight_smile:

I would use an action of the type "Replace with regular expression" for TITLE
Search string: (.) (feat. (.) ((.*))
Replace string: $1 $3 (feat. $3

Which should lead to

TRACK = Foreign Tongues (Acoustic Version) (feat. Eleni Drake)

and then the already working "Guess value" action.

got the result after doing,
$1 $3 (feat. $2

Thanks a lot :slight_smile: