Need to reverse folder names (First Name / Last Name)

I've got a long list of folders, one per person, using their full names in normal order (i.e. - John G. Smith). I'd like to have the folder renamed with last name first (Smith, John G.). With the various combinations of names present, I think a parsing of 1) last full word first, followed by 2) a comma, followed by 3) everything before the last word, would work.

If someone else has already requested this, can you point me to a thread... I couldn't find one. Otherwise, can anyone get me started? :slight_smile:

Old name: (.+) ([^ ]+)
New name: \2, \1
Type: Regular expressions


Wow! Thanks Leo!