Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (http://www3.telus.net/pfrank)
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Shortening names of the video files

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions
View previous topic :: View next topic  
Author Message
Orange



Joined: 22 Jan 2011
Posts: 2
Location: Russia

PostPosted: Sat Jan 22, 2011 6:41 pm    Post subject: Shortening names of the video files Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Sun Jan 23, 2011 8:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Orange



Joined: 22 Jan 2011
Posts: 2
Location: Russia

PostPosted: Mon Jan 24, 2011 4:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com