Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "")
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Conditionally Incrementing/Renaming Movie Files?

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

Joined: 28 May 2009
Posts: 1

PostPosted: Thu May 28, 2009 5:34 pm    Post subject: Conditionally Incrementing/Renaming Movie Files? Reply with quote

First of all, let me thank you for making what seems to be a fantastic versatile program. Releasing it as freeware is a very noble thing to do when it seems like everyone is out to make a quick buck today.

Now that I've gotten that out of the way, let me explain my dilema a little bit Smile

I've got a little over 900 Avi files on a hdd that I'd like to do a mass rename on. I normally wouldnt care so much about the filenames as the folders themselves are all organized the way I want them, but I need to get the filenames proper for a media center's library mode to display them properly (xbmc).

Here's an example of how the folder/file structure looks:

->Movie A\
->Movie B\
->Movie C\
->Movie D\

and tons of other variants...everything from spaces/dashes/underscores to the location of the a,b,c/1,2,3/etc label.

What I need to be able to figure out how to do is rename all the files to their folder name (easy enough, I've figured that part out), but in instances where there's more than one file to append -CD1/-CD2/-CD3/etc to the filenames when there are more than one file located in the directory. Single files are fine as the foldername itself, its just the multi CD movies that need to be labeled as such. Due to the variation of filenames and my inexperience with regular expressions i'm at a loss on how to get this accomplished.

Any help would be greatly apriticated, at this point my only other option is to go in by hand and rename the movies (something I was doing up until I grew frustrated at the amount of time it was taking and decided to google around a bit). I did a few searches around your forums but was unable to find anything that I could use.
Back to top
View user's profile Send private message
Site Admin

Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Fri May 29, 2009 3:28 am    Post subject: Reply with quote

Renaming the files so that they are appended with CD1/2/3 can be easily done however, it would be done for every file in each folder.
If you don't want the CD1 for lone files of a folder, then would to write a plugin. the plugin could be the last command of the sequence and it could check if there is only one file in the folder; if there is then change the name being processed so that the CD1 is removed.

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

Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | | Image Hosting | Photo Gallery |

Powered by, setup your forum now!
For Support, visit