Page 1 of 1
Reordering words in names - how?
Posted: 19 Feb 2008, 11:18
by shurikas
Hi,
I need to reorder words in file names, but I can not understand how to do that. For example, I have file:
"Aillwee cave 2006.04.24 12-53-55.jpg"
I want to reorder words like this:
"2006.04.24 12-53-55 Aillwee cave.jpg"
How to do this with batch rename?
Thanks!
Posted: 19 Feb 2008, 11:40
by Jan Rysavy
Show us more names you need to rename.
Is it always pattern "NAME1 NAME2 DATE TIME.jpg"
that you need rename to "DATE TIME NAME1 NAME2.jpg"?
With NAME1, NAME2, DATE, and TIME I mean stings that doesn't contain space character. So for example "Aillwee 2006.04.24 12-53-55.jpg" will not match this pattern because there isn't NAME2. Also "The Aillwee cave 2006.04.24 12-53-55.jpg" will not match it because there are three names: NAME1, NAME2, and NAME3.
Posted: 19 Feb 2008, 11:49
by shurikas
Unfortunately no. It can be one word, or even 5 words like Name1 ... Name5. But the date/time format is fixed.
Posted: 19 Feb 2008, 11:50
by Jan Rysavy
Is DATE and TIME always in format "yyyy.mm.dd hh-mm-ss"?
Posted: 19 Feb 2008, 11:55
by shurikas
Yes, date and time always in format "yyyy.mm.dd hh-mm-ss".
Posted: 19 Feb 2008, 12:03
by Jan Rysavy
Try this (my lame approach, but should be clear).
Search for: (.*) (\d\d\d\d.\d\d.\d\d) (\d\d-\d\d-\d\d)
Replace with: $2 $3 $1
[X] Regular expression
Note: the () capture subexpression for further use with $1, $2, etc.
The \d stands for digit character.
Posted: 19 Feb 2008, 12:23
by shurikas
Thanks!
It worked!