# Switch multiple First and Last names

**URL:** https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169
**Category:** Support
**Created:** [November 26, 2012, 5:16pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169 "2012-11-26T17:16:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Adriaan20](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@Adriaan20](https://community.mp3tag.de/u/Adriaan20)
#### Post date: [November 26, 2012, 5:16pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/1 "2012-11-26T17:16:40Z")

</div>

How to switch First and Last name I know, but how to switch multiple names I don't.

ie _Bing Crosby & Grace Kelly - True Love_ to change to _Crosby, Bing & Kelly, Grace - True Love_.  
I've tried numerous expressions but can't solve this one.

Thanks in advance (a bit desperate MP3Tag user)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [November 26, 2012, 5:21pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/2 "2012-11-26T17:21:00Z")

</div>

Before you invest any more brain power, please read this thread of the pros and cons of putting last names first.  
[How to rearrange artist name](https://community.mp3tag.de/t/13887/5)

In short: don't.

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [November 26, 2012, 5:39pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/3 "2012-11-26T17:39:02Z")

</div>

I think you'll find that you have few enough multiple-artist tracks that doing it manually is sufficient. There's no real need to automate it for the relatively small number of instances that you'll encounter in your library.

If that's a file name or track title (from a compilation, for instance) then I wouldn't change it, as I find the original to be more readable. However, I would use it for a sort field:

ALBUM=Raising Sand  
ALBUMARTIST=Robert Plant & Alison Krauss  
ALBUMARTISTSORT=Plant, Robert & Krauss, Alison

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [November 26, 2012, 7:11pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/4 "2012-11-26T19:11:57Z")

</div>

> [@Adriaan](#):
>
> How to switch First and Last name I know, but how to switch multiple names I don't.  
> ie _Bing Crosby & Grace Kelly - True Love_ to change to _Crosby, Bing & Kelly, Grace - True Love_.  
> I've tried numerous expressions but can't solve this one.Thanks in advance (a bit desperate MP3Tag user)

You have to use the right one ready made expression or write your own expression ...  
Further inspiration you can find there ...  
[/t/13595/1](https://community.mp3tag.de/t/13595/1)

DD.20121126.2108.CET

---

<div class="post-metadata">

### Author: ![gwenkillerby](https://community.mp3tag.de/user_avatar/community.mp3tag.de/gwenkillerby/32/407_2.png) [@gwenkillerby](https://community.mp3tag.de/u/gwenkillerby)
#### Post date: [November 27, 2012, 7:54pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/5 "2012-11-27T19:54:43Z")

</div>

> [@Adriaan](#):
>
> How to switch First and Last name I know, but how to switch multiple names I don't.
> 
> ie _Bing Crosby & Grace Kelly - True Love_ to change to _Crosby, Bing & Kelly, Grace - True Love_.  
> I've tried numerous expressions but can't solve this one.
> 
> Thanks in advance (a bit desperate MP3Tag user)

You can do it of course, but it's a lot of work.  
The basic solution is to put the tags in the filename, and then F around with the filenames, and then put it back.  
Kind of like solving the first layer of a Rubiks Cube \<\<\< yes, geekgrrrl frame of reference here 😉

Step 1  
Renaming the files with the tags. This should be easy enough. The result is that you have many file named  
_Bing Crosby & Grace Kelly - True Love.mp3_  
_Bing Crosby & Grace Kelly - True Love.mp3_  
_Bing Crosby & Grace Kelly - True Love.mp3_  
_Bing Crosby & Grace Kelly - True Love.mp3_  
of course, they would all have DIFFERENT NAMES! I just copy pasted, cos i'm lazy etc.

Step 2 Switching the first and last name of the files themselves.  
You can do this in two ways:  
A. Via Excel and a batch file (skip to below)  
or  
B. Via a good Filemanager, other than Windows Explorer. Like Total Commander, get it at [www.ghisler.com](http://www.ghisler.com), it's still free nagware, i guess.

It's easier if you have Total Commander, or any other application that can to Regular eXpressions

> [@](#):
>
> Subexpressions for search+replace  
> Text parts in round braces are taken as subexpressions.  
> Example: To swap the title and interpreter in the file name of an mp3 file, when they are separated by a dash (Title - Interpret.mp3), this can be  
> solved like this:  
> Search for: (._) - (._).mp3  
> Replace by: $2 - $1.mp3  
> Here $1 means the text in the first brace, and $2 the text in the second brace.

You can do that with multiple fields I guess, in your case 5 minimum.  
Search for: (._) - (._) - (._) - (._) - (.\*).mp3  
Replace by: $4 - $5 - $2 - $3 - $1.mp3

You should test on a small number of files, say 5, and have back ups!

EXCEL and batch files

This is maybe easier for you,

1. you should get all the filenames and paste them in a textfile.  
Total Commander has a button for that, but if you don't have that, type this into the Run box  
**cmd /k dir/s \*.mp3 \> C:\Documents and Settings\AllMyMP3-Files.txt**

The textfile will look like this:

> [@](#):
>
> anya marina & john smith - move you.mp3  
> mark craft & john smith - dragonfly.mp3  
> ry cooder & john smith - jericho blues.mp3

1. Then, you should put comma's after each first name, and after each last name.  
in short, edit the textfile until it looks like this:

> [@](#):
>
> FirstName1, Lastname1, FirstName2, Lastname2, Title.  
> anya, marina, john, smith, move you.mp3  
> mark, craft, john, smith, dragonfly.mp3  
> ry, cooder, john, smith, jericho blues.mp3

Note that you should add as a FIRST LINE  
FirstName1, Lastname1, FirstName2, Lastname2, Title

1. Save the file with the extension .XLS or .CSV

2. Open it with Excel  
if it worked, you should see a spreadsheet with 5 columns with the headers:  
FirstName1, Lastname1, FirstName2, Lastname2, Title

3. Swap the columns around until it they are in this order.  
Lastname1, FirstName1, Lastname2, FirstName2, Title

4. Save the file. Save it again with a .BAT extension. That first save is just a backup.

5. Open the batch file in your favorite editor.  
edit it until it looks like this.

RENAME"Bing Crosby & Grace Kelly - True Love.mp3" "Crosby, Bing & Kelly, Grace - True Love.mp3"  
RENAME"Bing Crosby & Grace Kelly - True Love.mp3" "Crosby, Bing & Kelly, Grace - True Love.mp3"  
RENAME"Bing Crosby & Grace Kelly - True Love.mp3" "Crosby, Bing & Kelly, Grace - True Love.mp3"  
RENAME"Bing Crosby & Grace Kelly - True Love.mp3" "Crosby, Bing & Kelly, Grace - True Love.mp3"

So, in short, the command should look this:  
RENAME "xxx.mp3" "xxx.mp3". Take note of the FOUR double quotes surrounding the filenames.

1. Run the batch file (click on it!)  
All your files should be renamed, but make back ups just in it FRAKS it all up.

2. Now, in mp3 tag, use the "From Filename to tag"-function to get what you want

3. rename the files with MP3tag if you would want that.

---

<div class="post-metadata">

### Author: ![Adriaan20](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@Adriaan20](https://community.mp3tag.de/u/Adriaan20)
#### Post date: [November 28, 2012, 4:02am UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/6 "2012-11-28T04:02:14Z")

</div>

Thanks!! to all of you ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:") Problem Solved. Finally I can Go on, this is great now I can use my DLNA server properly. There's still a lot of work to do but now with pleasure 😆 😆

---

<div class="post-metadata">

### Author: ![gwenkillerby](https://community.mp3tag.de/user_avatar/community.mp3tag.de/gwenkillerby/32/407_2.png) [@gwenkillerby](https://community.mp3tag.de/u/gwenkillerby)
#### Post date: [November 28, 2012, 12:08pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/7 "2012-11-28T12:08:46Z")

</div>

How did you solve it? I'm just curious.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:24pm UTC](https://community.mp3tag.de/t/switch-multiple-first-and-last-names/14169/8 "2026-02-09T12:24:12Z")

</div>


