Need to rename Folders by swapping first and last names
Posted on 2010-08-23
Using Visual Studio 2008
I have 40,000 folders each with a employee name.
The way it was setup orignally was was "First Name Last Name" Like "Cindy Jones"
However some of the names include middle initials (in some cases multiple initials) and "jrs"
Like "Brian W. H. Marks Jr"
I need to swap first and last name order for all the folders (rename them and add a comma)
I can do the simple names but I am having trouble with the middle initials and suffixes.
How can I swap:
Brian W. I. Marks Jr
Marks, Brian W. I. (Jr is irrelevant)
Cindy A. Jones
And recourse all the directories of a specified folder?
(Note: I do NOT need to rename any files or folders under the original subfolder listing of 40K folders.)