# Help with finding or making tagger script to handle (feat. …)

**URL:** <https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911>\
**Category:** MusicBrainz Picard\
**Tags:** featured-artists, taggerscript\
**Created:** [November 18, 2019, 6:54pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911 "2019-11-18T18:54:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumsebiene](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@Sumsebiene](https://community.metabrainz.org/u/Sumsebiene)\
**Post date:** [November 18, 2019, 6:54pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/1 "2019-11-18T18:54:09Z")

</div>

Hey guys, sorry I couldn’t find a script so far yet that does what I want (only the other way round):

If I have an mp3 that is tagged like

artist: Kanye West  
title: Good Life (feat. T-Pain) or Good Life feat. T-Pain or Good Life (Feat. T-Pain)

the script should rename it to:  
artist: Kanye West feat. T-Pain  
title: Good Life

Is there something like that out there? Often I have releases that are not in the database, so the tags are not automatically fixed.  
Would be very cool if something like this existed, otherwise I might be able to reverse the script that [philn96] posted

---

<div class="post-metadata">

**Author:** ![st3v3p](https://community.metabrainz.org/user_avatar/community.metabrainz.org/st3v3p/32/23922_2.png) [@st3v3p](https://community.metabrainz.org/u/st3v3p)\
**Post date:** [November 19, 2019, 10:19am UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/2 "2019-11-19T10:19:40Z")

</div>

picard should do that be default unless you are using the plugin that puts the featured artist in to the title

---

<div class="post-metadata">

**Author:** ![Billy\_Yank](https://community.metabrainz.org/user_avatar/community.metabrainz.org/billy_yank/32/1585_2.png) [@Billy\_Yank](https://community.metabrainz.org/u/Billy_Yank)\
**Post date:** [November 19, 2019, 3:47pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/3 "2019-11-19T15:47:20Z")

</div>

It’s likely that the name is wrong in the database. The long-term solution would be to edit the release in MusicBrainz to move T-Pain to the Artist field.

---

<div class="post-metadata">

**Author:** ![Sumsebiene](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@Sumsebiene](https://community.metabrainz.org/u/Sumsebiene)\
**Post date:** [November 19, 2019, 8:20pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/4 "2019-11-19T20:20:33Z")

</div>

Thanks guys, unfortunately I’m trying to tag lot of releases that are not in the db yet.

---

<div class="post-metadata">

**Author:** ![st3v3p](https://community.metabrainz.org/user_avatar/community.metabrainz.org/st3v3p/32/23922_2.png) [@st3v3p](https://community.metabrainz.org/u/st3v3p)\
**Post date:** [November 19, 2019, 11:53pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/5 "2019-11-19T23:53:30Z")

</div>

you can add them to the db that will help others as well 🙂

---

<div class="post-metadata">

**Author:** ![psychoadept](https://community.metabrainz.org/user_avatar/community.metabrainz.org/psychoadept/32/204_2.png) [@psychoadept](https://community.metabrainz.org/u/psychoadept)\
**Post date:** [November 20, 2019, 5:05am UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/6 "2019-11-20T05:05:15Z")

</div>

Backing up @Billy_Yank and @st3v3p, adding them to the database isn’t much more work for you than tagging the tracks manually, and it will save you a lot of time if you ever need to retag. That’s how I got started editing, lol.

---

<div class="post-metadata">

**Author:** ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)\
**Post date:** [November 20, 2019, 4:32pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/7 "2019-11-20T16:32:03Z")

</div>

Here is a script that can do this for you for files on the left:

```taggerscript
$set(_feat,$rsearch(%title%,\\s+\\\(?\(feat\\.[^\)]*\)))
$set(title,$rreplace(%title%,\\s+\\\(?feat\\.[^\)]*\\\)?,))
$set(artist,$if(%_feat%,%artist% %_feat%,%artist%))

```

This looks for “feat.” matches in the title, removes it from the title and ads it to the artist. The regular expression used to find the featuring is a bit hard to read due to all the escaping needed, but written plain it is `\s+\(?(feat\.[^\)]*)`. This will match both with and without parantheses, i.e. both " (feat. T-Pain)" and " feat. T-Pain".

To use this do the following:

- In Options \> Scripting add a new script. Give it a nice name, e.g. “Move featuring from title to artist”. Copy and paste the script from above.
- I would recommend to disable the checkmark in front of the script. This way it will not run automatically for releases loaded on the right, it should not be necessary there.
- To use it, right click on the files you want to change and select the script in the “Run script” submenu.

---

<div class="post-metadata">

**Author:** ![Sumsebiene](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@Sumsebiene](https://community.metabrainz.org/u/Sumsebiene)\
**Post date:** [February 15, 2020, 9:15pm UTC](https://community.metabrainz.org/t/help-with-finding-or-making-tagger-script-to-handle-feat/451911/8 "2020-02-15T21:15:13Z")

</div>

Thank you so much, I just realized that you replied to me here - Awesome!
