Hello,
I am renaming over 30,000 files and the majority of these files contains a date within the filename...
Example:
Facility Stats 12 21 2009 .xlsx
What I need is the date format in like this, YYYY MM DD
Example:
Facility Stats 2009 12 21 .xlsx
Is there a renaming script that will identify the date format and change it the way I need it? FROM: MM DD YYYY -> YYYY MM DD
Could there be a button made where if I select the date in the filename, the YYYY would come infront of the MM DD?
Thank You
Gurp
steje
February 11, 2010, 12:25am
2
There may be a shorter expression to do it, but this should work:
Old name: b ([0-9][0-9]) ([0-9][0-9]) ([0-9][0-9][0-9][0-9]).(.*)[/b]
New name: \1 \4 \2 \3 \5
Type: Regular Expressions
You can also check off the Rename files in selected sub-folders option, and Opus will run the rename expression against everything under the folders you select...
Edit Note: had a goof in the new name expression - fixed it.
that regular expression works great, thank you
I had another question relating to this expression.
Some of my file names are like:
Facility Stats 2 21 2009 .xlsx
In this regular expression, is there a way I can add a 0 in front of the single digit months (1-9)
I would want it like this:
Facility Stats 02 21 2009.xlsx
Thank You[/b]
I actually figured it out,
I added a "0" in front of the expression \2
Old name: (.) ([0-9][0-9]) ([0-9][0-9]) ([0-9][0-9][0-9][0-9]).(. )
New name: \1 \4 0\2 \3 \5
Thanks For the Help steje
steje
February 16, 2010, 9:45pm
5
I think I'm a dope(us)... the "new name" expression should have been:
New name: \1 \4 \2 \3.\5 yeah? To keep the file extension after the ".".
Yea that is correct, thanks again