Re-arrange a filename

A swapping-ground for Regular Expression syntax

Re-arrange a filename

Postby valenstar » Mon Jul 23, 2018 4:44 pm

Hello,

I am hoping someone can help me on how to rename some files a certain way. Below is an example of what I want is to take what happens to be the date and move it to the end of the filename.

THIS IS WHAT THE FILENAMES LOOKS LIKE CURRENTLY.
s01e01 - (10-02-1959) Where Is Everybody.avi
s01e02 - (10-09-1959) One For The Angels.avi
s01e03 - (10-16-1959) Mr. Denton On Doomsday.avi
s01e04 - (10-23-1959) Sixteen Millimeter Shrine.avi
s01e05 - (10-30-1959) Walking Distance.avi
s01e06 - (11-06-1959) Escape Clause.avi
s01e07 - (11-13-1959) The Lonely.avi
s01e08 - (11-20-1959) Time Enough At Last.avi
s01e09 - (11-27-1959) Perchance To Dream.avi
s01e10 - (12-04-1959) Judgement Night.avi

I WOULD LIKE IT TO LOOK LIKE THE FOLLOWING.
s01e01 - Where Is Everybody (10-02-1959).avi
s01e02 - One For The Angels (10-09-1959).avi
s01e03 - Mr. Denton On Doomsday (10-16-1959).avi
s01e04 - Sixteen Millimeter Shrine (10-23-1959).avi
s01e05 - Walking Distance (10-30-1959).avi
s01e06 - Escape Clause (11-06-1959).avi
s01e07 - The Lonely (11-13-1959).avi
s01e08 - Time Enough At Last (11-20-1959).avi
s01e09 - Perchance To Dream (11-27-1959).avi
s01e10 - Judgement Night (12-04-1959).avi

Can someone please help me with this? I would greatly appreciate.

Thank You.
Rudy Valentin of Covington, GA USA
valenstar
 
Posts: 2
Joined: Mon Jul 23, 2018 4:33 pm

Re: Re-arrange a filename

Postby therube » Mon Jul 23, 2018 5:52 pm

1:RegEx
Code: Select all
Match:  (.* -) (\(\d\d-\d\d-\d\d\d\d\))(.*)
Replace:  \1\3 \2
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Re-arrange a filename

Postby valenstar » Wed Jul 25, 2018 6:55 pm

therube, I thank you. :D :mrgreen:
valenstar
 
Posts: 2
Joined: Mon Jul 23, 2018 4:33 pm


Return to Regular Expressions