Switch multiple First and Last names


#1

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)


Switching first and last names in fields with multiple artists/soloists
Deleting First Names From Artist Tag
#2

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

In short: don't.


#3

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


#4

You have to use the right one ready made expression or write your own expression ...
Further inspiration you can find there ...
/t/13595/1

DD.20121126.2108.CET


#5

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 :wink:

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, it's still free nagware, i guess.

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

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:

  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:

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.


#6

Thanks!! to all of you :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 :laughing: :laughing:


#7

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