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*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating directories from file name

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



Joined: 31 Jan 2013
Posts: 2

PostPosted: Sun Feb 17, 2013 12:34 am    Post subject: Creating directories from file name Reply with quote

I have been playing around with PFrank for the last week or so trying to get
it to create a directory structure based on the file name.

The files I have are in the format:-

Surname.Forename - title.mobi

ie Alexander. Caroline - The Endurance_ Shackleton's Legendary Antarctic Expedition.mobi

What I am trying to produce is a directory c:\surname. forename\title.mobi or in the case of the example
c:\Alexander. Caroline\The Endurance_ Shackleton's Legendary Antarctic Expedition.mobi

Todate the best I can do is using the formula

(?Bx)(.*)[,](.*)[ ]+[-]+[ ]*(.*?)[ ]*[-][ ]*(.*) # build path

with replace pattern \1/\2/\3

but it does not appear to do anything

Where am I going wrong? Can anyone help

Thanks BJ
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Thu Feb 21, 2013 4:43 am    Post subject: Reply with quote

Hi,

Try this (without the single quotes):

Row: 1
Search: '(?Bx)(.*?)[ ]+[-]+[ ]*(.*)[.](.*)' # build path
Replace: 'c:/\1/\2.\3'

This is just a precaution but I would first preview and rename with a few sample files before unleashing it on everything.

Hope that helps,

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BJthebear



Joined: 31 Jan 2013
Posts: 2

PostPosted: Sat Feb 23, 2013 10:07 pm    Post subject: Reply with quote

Works a treat

Thanks very much
Brian
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