Multi-rename question: change "Aug" to "08" and replace space with dot

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
LabLover
Junior Member
Junior Member
Posts: 4
Joined: 2021-03-12, 16:01 UTC

Multi-rename question: change "Aug" to "08" and replace space with dot

Post by *LabLover »

I have a number of files that are named similar to:

Aug 14 2011 full.mp4 (the day of the month varies)

Using multi-rename search and replace I want to rename them in this format:

08.14.2011 full.mp4

I want to convert the month to a number and replace two spaces with dots / periods "." I want to retain the day of the month, the year and the rest of the name.

I use this search term: aug ?? (month abbreviation, a space, two character space holders and another space)

I use the replace term 08.??. and this is not working.

Any help would be greatly appreciated.
User avatar
Stiltzkin
Member
Member
Posts: 194
Joined: 2004-09-10, 17:15 UTC

Re: Multi-rename stupid question

Post by *Stiltzkin »

you could do it in 2 steps:


step1:
search for: jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec
replace with: 01|02|03|04|05|06|07|08|09|10|11|12

step2:
search for: (space)
replace with: .

or with [x]Regex enabled:
search for: (\d{1,2}) (\d{1,2}) (\d{4,4})(.*)
replace with: $1.$2.$3$4

that way you can sort the numbers
LabLover
Junior Member
Junior Member
Posts: 4
Joined: 2021-03-12, 16:01 UTC

Re: Multi-rename stupid question

Post by *LabLover »

Stiltzkin wrote: 2021-03-12, 17:21 UTC you could do it in 2 steps:


step1:
search for: jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec
replace with: 01|02|03|04|05|06|07|08|09|10|11|12

step2:
search for: (space)
replace with: .

or with [x]Regex enabled:
search for: (\d{1,2}) (\d{1,2}) (\d{4,4})(.*)
replace with: $1.$2.$3$4

that way you can sort the numbers
Thanks for this reply. Is there no way to do it in one step? BTW your method worked just fine and if I do them in batches of a 1,000 at a time, it should be great. Thanks again.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Multi-rename question: change "Aug" to "08" and replace space with dot

Post by *Stefan2 »

Hi 2LabLover and welcome.

In the MUT (Multi-rename Tool) left of [Start!] there is a reload button for to load the last selected files again into the view.
And with the "F2"-key you can store and load settings for quick access.

- - -

FROM:
Aug 14 2011 full.mp4
TO:
08.14.2011 full.mp4

You can try to add Stiltzkins' step2 to step1
But for your request "replace spaces with dots" you should better use
an RegEx search and replace to match the space at the digits only, else you will end up with "08.14.2011.full.mp4"




 
LabLover
Junior Member
Junior Member
Posts: 4
Joined: 2021-03-12, 16:01 UTC

Re: Multi-rename question: change "Aug" to "08" and replace space with dot

Post by *LabLover »

Stefan2 wrote: 2021-03-12, 18:51 UTC Hi 2LabLover and welcome.

Thanks for the warm welcome and thanks for the advice. I will brush-up on my Regex, it's been a while.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Multi-rename question: change "Aug" to "08" and replace space with dot

Post by *Stefan2 »

LabLover wrote: 2021-03-12, 19:54 UTC I will brush-up on my Regex, it's been a while.

Stiltzkin gave you already a possible solution





 
LabLover
Junior Member
Junior Member
Posts: 4
Joined: 2021-03-12, 16:01 UTC

Re: Multi-rename question: change "Aug" to "08" and replace space with dot

Post by *LabLover »

Stefan2 wrote: 2021-03-12, 20:52 UTC
LabLover wrote: 2021-03-12, 19:54 UTC I will brush-up on my Regex, it's been a while.

Stiltzkin gave you already a possible solution
Yes he did, I just tried it and it works great! Many thanks to both of you!
Post Reply