PDA

View Full Version : Reverse peoples first and last names



FileFidler
04-01-2011, 08:45 AM
I have a bunch of files like this:

Bush, George - this is some text.epub
Kennedy, Edward M. - other text.epub

What I'd like to do is change this to:

George Bush - this is some text.epub
Edward M. Kennedy - other text.epub

In other words, swap first and last names and remove the comma.

There may be other commas in the file name so the search should be limited to everything before the first "-".

Can this be done with regular expressions?

Thanks

jflatto
05-12-2011, 10:39 AM
Back on March 20, 2010; I asked a similar question about folder names. The support team answered (copied below). The answer might be able to help you.


[QUOTE=jflatto;50]I am running File Renamer Deluxe 6.0.1 under Windows 7 64bit.

I have two sets of folders that I have downloaded from the Internet related to author's names. One set of folders is named as firstname lastname such as "John Smith".

The other set of folders is named lastname, firstname such as "Smith, John".

Is there any way to use File Renamer to rename one set of folder names to be consistent with the other. My preference would be to go to "Smith, John" but I will take either method.

Thanks.

Jerry

[QUOTE=sc_support;51]Absolutely,

You could use the Regular Expressions search/replace feature.

Go to the "Find / Replace" tab, then make sure "Find using Regular Expressions" is checked.

In the "Find" Box, type in (without the quotes): "(\w+), (\w+)"
in the replace box, type in "$2 $1" (again, without the quotes). Click