Page 1 of 1

Renaming files with date in name field

PostPosted: Wed Oct 10, 2018 3:58 pm
by soulman1949
Hi there

First time poster here, although I've been using the program for quite a few years.

I have hundreds of recorded TV programmes on my NAS which have the following format:

progname - dd-mm-yyyy - progid.mp4

where dd-mm-yyyy are dates, such as 15 12 2015

I would like to change the filenames to the following format which makes sorting files much easier:

progname - yyyy-mm-dd - progid.mp4

Could I use BRE to rename these files and if so, how? Incidentally, I cannot use the file timestamps as, in some cases, the programmes were downloaded much later.

Many thanks

Alan

Re: Renaming files with date in name field

PostPosted: Wed Oct 10, 2018 7:25 pm
by Emerkamp
Hi,
As long as all your files have this same pattern you can try this, copy/paste regex code.

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

Re: Renaming files with date in name field

PostPosted: Thu Oct 18, 2018 7:24 am
by KrishneelChand
can I get help on switching the date from dd MMMM yyyy to MMMM dd yyyy
example
filename - 10th August 2017 - text - Full Episode.mp4
to
filename - August 10th 2017 - text - Full Episode.mp4

PS: I'm doing this to sort the files according to date which I can't do now because all the same dates come first eg. 1st January, 1st February, 2nd January, 2nd Feb... etc.
Any other ideas to sort this would be appreciated
First time posting, hope this is not against rules :)

UPDATE: Okay I modified the previous answer and it worked out perfectly, thanks :)

Re: Renaming files with date in name field

PostPosted: Fri Oct 26, 2018 11:40 pm
by soulman1949
Apologies for late response, I've been quite ill the last few weeks. Thank you so much Emerkamp, that worked a treat.