cannot find the solution - change date format

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

cannot find the solution - change date format

Postby DutchFlyingMike » Sun Jan 19, 2020 4:10 pm

I managed to remove underscores and some words, but the next step i cannot solve.
I have several files from a podcast program. During the last years they changed the filenames.
I now have a list with

De Sandwich 19-05-2019.mp3
De Sandwich 20-10-2019.mp3
etc.

I like to change the filenames in
2019-05-19 De Sandwich.mp3
2019-10-20 De Sandwich.mp3

Can someone explain, maybe with screenshots, how to fix this problem?

Thx for helping
DutchFlyingMike
 
Posts: 4
Joined: Sat Jan 18, 2020 7:09 pm

Re: cannot find the solution

Postby therube » Sun Jan 19, 2020 4:57 pm

Assuming your files end in (space) day-mon-year...

1:Regex
Code: Select all
Match:  (.*)\s(\d\d)-(\d\d)-(\d\d\d\d)
Replace:  \4-\3-\2 \1

match everything up to the date
match the day
match the month
match the year

rearrange to: year-mon-day everythingelse
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: cannot find the solution - change date format

Postby DutchFlyingMike » Tue Jan 21, 2020 12:24 pm

Thanks, it worked!
This was too difficult for me.
Gr.
Mike
DutchFlyingMike
 
Posts: 4
Joined: Sat Jan 18, 2020 7:09 pm

Re: cannot find the solution - change date format

Postby DutchFlyingMike » Tue Jan 21, 2020 5:14 pm

Hello therube,

Hopefully you want to help me again.
I tried to understand which commands you used, but still have problems.

Another part of my files is as followed: 01-01-2017 De Sandwich.mp3
01-10-2017 De Sandwich.mp3 (date D/M/Y)
I would like to have it as: 2017-01-01 De Sandwich.mp3
2017-10-01 De Sandwich.mp3 (date Y/M/D)

Thx in advance,
Mike
DutchFlyingMike
 
Posts: 4
Joined: Sat Jan 18, 2020 7:09 pm

Re: cannot find the solution - change date format

Postby therube » Thu Jan 23, 2020 3:58 am

Code: Select all
Match:  (\d\d)-(\d\d)-(\d\d\d\d)(.*)
Replace:  \3-\2-\1\4


Original, (date D/M/Y).
Code: Select all
D = \1
M = \2
Y = \3

The \# are positional fields (based on the parenthesis in your Match:).

Just rearrange as you want, Y-M-D = \3-\2-\1.
And M-Y-D = \2-\3-\1.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: cannot find the solution - change date format

Postby DutchFlyingMike » Fri Jan 24, 2020 9:24 am

Hello therube,

Thx for helping me.
Now i understand how it works.
My list is organized now. The duplicates are removed.
I'm very happy now.
Problem solved.

Gr
Mike
DutchFlyingMike
 
Posts: 4
Joined: Sat Jan 18, 2020 7:09 pm


Return to BRU Support