View previous topic :: View next topic |
Author |
Message |
Orange
Joined: 22 Jan 2011 Posts: 2 Location: Russia
|
Posted: Sat Jan 22, 2011 6:41 pm Post subject: Shortening names of the video files |
|
|
Hello everyone!
I need some help renaming video files with names like
[Zero-Raws] ONE PIECE - 455 RAW (CX 1280x720 x264 AAC).mkv
[GoodAnime.net] One Piece episode - 439 [English Sub][480p].srt
[AA-Raws] One Piece 461 (720p) [3B06E166].mkv
into just
One Piece 455.mkv
One Piece 439.srt
and so on.
The formats of the initial names are different, but the number of the episode always comes in front of all other numbers.
I would really appreciate any help! I am completely new to regular expressions and it seems it will take a lot of time studying them, while I need only one fairly simple (probably, I'm not sure) thing to do. Though it would be interesting to study them, which I will probably do when I have some more free time.
Thanks. |
|
Back to top |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Sun Jan 23, 2011 8:57 pm Post subject: |
|
|
Hi,
copy and paste the following into the specified rows of the custom renaming creator (do not include the single quotes)
Row: 1
Search: '(?Ex) [\{\(\[]+.*?[\]\}\)]+ # delete brackets + contents'
Replace:
Row: 2
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*Prefix*'
The first row is a regular expression but it is using a custom flag '(?Ex)' to isolate the changes to the prefix of the filename (ie. excludes the filename extension).
The second row is a pre-defined command to change the letter case to 'title case'.
The renaming will not be perfect in your first example because the word 'RAW' does not appear inside any brackets. For cases like that you can either manually modify the entry when the preview list comes up or you can add another line to delete the word RAW. If you do that then insert such that the 'title case' command is in the last row.
You can also add a line to remove the '-' character.
An example with the extra deletions is below:
Row: 1
Search: '(?Ex) [\{\(\[]+.*?[\]\}\)]+ # delete brackets + contents '
Replace:
Row: 2
Search: 'RAW'
Replace:
Row: 3
Search: '-'
Replace:
Row: 4
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*Prefix*'
A shortcut for inserting the above 4 rows is to copy the entire renaming block above (including the Row: 1 line) to the clipboard using the mouse. Then clock on the PFrank main window and then press Ctl-F2. That should copy the entire sequence into the custom renaming creator.
Hope that helps.
Peter. |
|
Back to top |
|
 |
Orange
Joined: 22 Jan 2011 Posts: 2 Location: Russia
|
Posted: Mon Jan 24, 2011 4:07 pm Post subject: |
|
|
Thank you very much! That helped, although some words have remained after renaming, as you said, but I can handle them with your instructions.
Thanks again, I really appreciate your great efforts and the time you spend to help people.
Good luck! |
|
Back to top |
|
 |
|