View previous topic :: View next topic |
Author |
Message |
shtonkalot
Joined: 18 Dec 2008 Posts: 2
|
Posted: Fri Dec 19, 2008 12:00 am Post subject: Rename "101 -video.avi" to "Video - S01E01.av |
|
|
Hi all.
I like the look of this program but I am at a loss with how to do the renaming I'm after.
I have a folder full of files named like: "403 - video title.avi"
I'd like to rename the files so that the digits are used at the end of the title with extra characters for season and episode, also I would like the first letters of each word capitalised .
So the above would become: "Video Title - S04E03.avi"
Is this possible?
If so, can anyone provide some help with this?
If not, can anyone recommend a product that can do this?
**edit**
After looking through the regex section in the help manual some more I still have no clue.
I am having a very hard time trying to understand the regular expressions.
Does anyone know of any online tutorials or other learning material that might help me understand?
Last edited by shtonkalot on Fri Dec 19, 2008 2:39 am; edited 1 time in total |
|
Back to top |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Fri Dec 19, 2008 2:32 am Post subject: |
|
|
This can be done fairly easily. Paste the follwoing info into the specified rows (do not inlcude the single quotes).
Row: 1
Search: '(?E)^([0-9]+)\s*\-\s*(.*)'
Replace: '\2 - \1'
Row: 2
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*All*'
Row: 3
Search: '(?x) ([^0-9]|^)([0-9]{3,3})([^0-9]|$) # pad 3 digit number'
Replace: '\g<1>0\2\3'
Row: 4
Search: '([0-9]{2,2})([0-9]{2,2})'
Replace: 'S\1E\2'
A simple way to paste the info is to use the mouse to block select all of the above, then click on the PFrank main window and press CTL-F2.
the first row swaps the required fields.
the second row capitalizes each word. There are options to control the capitilization.
the third row pads 3 digit number to 4 digits (ie. adds a leading zero if necessary
the fourth row adds the S and E indicators.
Press 'scan' and check the preview window that popos up.
Hope that helps.
Peter. |
|
Back to top |
|
|
shtonkalot
Joined: 18 Dec 2008 Posts: 2
|
Posted: Fri Dec 19, 2008 2:41 am Post subject: |
|
|
Thanks very much Peter.
I'm very interested in how these regular expressions work so I appreciate you explaining what each expression does.
I was editing my last post as you replied.
admin wrote: | Press 'scan' and check the preview window that popos up. |
Ah, the only problem now is that a couple of the file names have numbers (specifically "2000" in this case) at the end of the file name before the extension.
These too get renamed with the S and E in them.
Apart from that though it worked brilliantly.
Thanks again. |
|
Back to top |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Fri Dec 19, 2008 5:35 am Post subject: |
|
|
Hi,
To fix the problem with numbers in the title, try replace row 4 with the following info:
Row: 4
Search: '([0-9]{2,2})([0-9]{2,2})\.'
Replace: 'S\1E\2.'
This specifies that only numbers before a '.' will have the S and E added.
Peter. |
|
Back to top |
|
|
|