Moving a word

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Moving a word

Postby exactoinc » Mon Jun 22, 2009 6:01 pm

I would like to move the first word in the file name to just before the next-to-last word in the file name before the extension.

Example:

Sams great uncle is really red on 01-01-09.jpg

becomes

great uncle is really red Sams on 01-01-09.jpg

The first word can be 3 or 4 characters but always starts with the same two characters but varies after that. The number of words and characters between the first word and the next-to-last word is variable. The next-to-last word is always the same word. The last word is always a date but not always in the same format. Sometimes the year is 2 numbers and sometimes it is 4 numbers.

Multiple steps is fine. Renaming 100 files in 3 or 4 steps is better than renaming 100 files individually.

The ability to move words as easily as characters would be a nice feature. Unless it already exists and I'm just missing it.

I have used this excellent utility in the past but for some reason can't figure out how to get this to work.

Thanks,
exactoinc
 
Posts: 2
Joined: Mon Jun 22, 2009 5:22 pm

Re: Moving a word

Postby shhac » Tue Jun 30, 2009 10:18 am

Try a regular expression like this:
Code: Select all
Match:   ^(.+?) (.+) on ([\-\.0-9]+)$
Replace: \2 \1 on \3
This one is specific to your example ending

Another could be

Code: Select all
^(.+?) (.+?) ([^\s]+ [^\s]+)$
\2 \1 \3
This one will let you use ANY last two words
shhac
 
Posts: 15
Joined: Tue Sep 11, 2007 10:47 pm

Re: Moving a word

Postby exactoinc » Tue Jun 30, 2009 5:01 pm

Very nice. Worked like a charm. Guess I just didn't understand the process but now I do. You were a great help.

Thank you so much,
exactoinc
 
Posts: 2
Joined: Mon Jun 22, 2009 5:22 pm


Return to BRU Support