View previous topic :: View next topic |
Author |
Message |
BJthebear
Joined: 31 Jan 2013 Posts: 2
|
Posted: Sun Feb 17, 2013 12:34 am Post subject: Creating directories from file name |
|
|
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 |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Thu Feb 21, 2013 4:43 am Post subject: |
|
|
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 |
|
 |
BJthebear
Joined: 31 Jan 2013 Posts: 2
|
Posted: Sat Feb 23, 2013 10:07 pm Post subject: |
|
|
Works a treat
Thanks very much
Brian |
|
Back to top |
|
 |
|