# How to move the word "The" to after the artist?

**URL:** https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585
**Category:** MusicBrainz Picard
**Created:** [September 17, 2016, 8:23pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585 "2016-09-17T20:23:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![amberln](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/c37758/32.png) [@amberln](https://community.metabrainz.org/u/amberln)
#### Post date: [September 17, 2016, 8:23pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/1 "2016-09-17T20:23:55Z")

</div>

I searched, I couldnt find a simple solution to move the word “The” after the artist. i.e. The Beatles becomes, Beatles, The.  
Its all I want to do, its something probably along the lines of:  
$replace($if($eq($left(%albumartist%,4),The )

but that doesnt work ☹  
a Pre-Thank you for the help!

---

<div class="post-metadata">

### Author: ![amberln](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/c37758/32.png) [@amberln](https://community.metabrainz.org/u/amberln)
#### Post date: [September 17, 2016, 9:32pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/2 "2016-09-17T21:32:11Z")

</div>

I may of figured it out? its:  
$left($if2(%albumartistsort%, %artistsort%),30)

I think thats working!

---

<div class="post-metadata">

### Author: ![CallerNo6](https://community.metabrainz.org/user_avatar/community.metabrainz.org/callerno6/32/39_2.png) [@CallerNo6](https://community.metabrainz.org/u/CallerNo6)
#### Post date: [September 17, 2016, 10:23pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/3 "2016-09-17T22:23:24Z")

</div>

Note: if you use `artistsort` on your entire collection, the changes won’t be limited to moving the ‘the’. You’ll also get e.g. “{family name}, {given name}” (which might not be something you want). More at [Style/Artist/Sort Name](http://musicbrainz.org/doc/Style/Artist/Sort_Name).

---

<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: [September 18, 2016, 5:11am UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/4 "2016-09-18T05:11:10Z")

</div>

If all you want is handling The and A, but you don’t want to use the sort name in other cases, you can also use the $swapprefix function.

$swapprefix(%artist%)

---

<div class="post-metadata">

### Author: ![amberln](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/a/c37758/32.png) [@amberln](https://community.metabrainz.org/u/amberln)
#### Post date: [September 18, 2016, 9:00am UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/5 "2016-09-18T09:00:44Z")

</div>

ty so much caller and outside!! Ya I def do not want to do artistsort now for my collection. Glad u told me ty caller6!

And thats perfectly what I wanted too outside, just a simple syntax to move the and a after the artist. thanks again!

---

<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: [September 18, 2016, 10:13am UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/6 "2016-09-18T10:13:05Z")

</div>

Just for completeness, you can define your own set of prefixes. The default is A and The, but if you also want to move e.g. the German “Die” (the equivalent to English The) as in “Die Toten Hosen” you can do that also:

```
$swapprefix(%artist%,A,The,Die)
```

---

<div class="post-metadata">

### Author: ![vinylsteve](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/v/d6d6ee/32.png) [@vinylsteve](https://community.metabrainz.org/u/vinylsteve)
#### Post date: [September 23, 2017, 2:03pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/7 "2017-09-23T14:03:41Z")

</div>

Hello, Hope no one minds if i ask a similar question in this thread? I have the same problem as the OP. I put the “$swapprefix(%artist%,A,The,Die)” that outsidercontext replied with but it didn’t work so i tried without “Die” same result and then without “The and A” same result again. Does it need to go in a particular place in the renaming string i’m using? This is what i’m currently using  
$if2(%albumartist%,%artist%)/$if($ne(%album%,),%album% /)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%tracknumber%,),$num(%tracknumber%,2) %title%,%title%)$if($ne(%musicbrainz\_artistid%,%musicbrainz\_albumartistid%), [%artist%],)

Thanks

---

<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: [September 23, 2017, 2:44pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/8 "2017-09-23T14:44:09Z")

</div>

It needs to go where ever in that renaming string you want it 😉

E.g. your script currently creates a folder for the artist:

```
$if2(%albumartist%,%artist%)

```

If you want to swap the prefix there you have to use the $swapprefix function exactly there, e.g.

```
$swapprefix($if2(%albumartist%,%artist%))
```

---

<div class="post-metadata">

### Author: ![vinylsteve](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/v/d6d6ee/32.png) [@vinylsteve](https://community.metabrainz.org/u/vinylsteve)
#### Post date: [September 23, 2017, 4:09pm UTC](https://community.metabrainz.org/t/how-to-move-the-word-the-to-after-the-artist/135585/9 "2017-09-23T16:09:06Z")

</div>

That worked a treat, thanks, 😄
