Changing file names using dashes and commas

Advanced Renamer forum
#1 : 26/05-13 04:46
Doc
Doc
Posts: 2
I have multiple files that are set up in the following format:
Origin - Surname, Name - Title
or
Origin - Title - Surname, Name

Is there any way to swap the Name and Surname without entering in a replace command for every name that is wrong? My end goal is to have all the files be in the following format:

Origin - Name Surname - Title

I have over 75,000 files that a large percentage of are in the original formats, which has led to multiple duplicates. I have been working on this, and even though using the program has helped tremendously on cutting down the time of fixing the general file errors like using underscores instead of spaces and things like that, this part is taking a long time and would like to make it as easy as possible.

Thank you for the help in advance.


26/05-13 04:46
#2 : 26/05-13 11:15
Doc
Doc
Posts: 2
Reply to #1:
Ok, So by reading some posts on page 12 or 13 of this forum I figured out how to swap the first and last name if its in : Origin - Last, First - Title format by using:
Replace:
To Be Replaced: - (.*), (.*) -
Replace with: - \2 \1 -
And turning on "Use regular expressions."

That works wonderfully... however I followed the logic that if that works in that format, then I thought by thinking of each part as a number, that I should be able to use something like:
In the case of: Origin - Title - Last, First and wanting Origin - First Last - Title.. then I should use:
To Be Replaced: (.*) - (.*) - (.*),(.*)
Replace with: \1 - \4 \3 - \2
Again with the "Use regular expressions" turned on.. but it doesnt seem to work. I dont know enough about the scripting to make this work for me.

Is this a little too complex for the program to handle? or can you only use one replace with "regular expression" at a time?

Thanks again for any help.


26/05-13 11:15
#3 : 27/05-13 10:31
Kim Jensen
Kim Jensen
Administrator
Posts: 883
Reply to #2:
You have understood how to use the regular expressions feature. I have tried you expression and it works for me. Maybe something else is not working. Note that a simple misplaced space in the expression will make it fail to match your expression.


27/05-13 10:31