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 

Alternating Title Case and Upper Case in a Folder Name

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Tue Aug 21, 2012 10:11 am    Post subject: Alternating Title Case and Upper Case in a Folder Name Reply with quote

Thank you for this wonderful program and also for having a forum to help us mere non techs.
---------------------
My situation:

On a network drive, we have many shared folders relating to our clients and their cases.

Over the years the naming conventions has been corrupted by the users and we have multiple folders that no longer follow our naming conventions.

In particular we have also sorts of upper and lower case combinations and it is becoming harder to find the files/folders we require. Hence I have been asked to clean up the folder names.
---------------
Remedy:

I want to use PFrank to follow this true naming convention:

eg:

I want to change

SMitH, JOHN allen (JsA-100-C1-abc)

to

Smith, John Allen (JSA-100-C1-ABC)

As you can see the messed up named is neatened and contains Title Case before the () and all letters inside the () are upper case.

-------------------------

I cannot figure out how to do this because I am not an IT personn and need help. So Please Help!

Thank you very much.
Back to top
View user's profile Send private message
Liquidmetal



Joined: 17 Aug 2012
Posts: 7

PostPosted: Tue Aug 21, 2012 3:49 pm    Post subject: Reply with quote

Anyone? Please help - it will make my task much easier if you can show me how this can be done. Thank you.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Tue Aug 21, 2012 4:24 pm    Post subject: Reply with quote

Copy the following into the custom renaming creator (do not include the single quotes):

Row: 1
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*Prefix*'

Make sure that you have set up the current folder panel to the folder of interest. There are options to make the renaming recursive (double-click the 'More...' button on the main window).
There also options for 'Changing Case' in which can be used to force any words to be upper case. These options are found under View->Options...->Change Case -> Force Case All Words.
Now press 'Scan'.

You'll see a preview window come up. If you dont loike what you see, just keep playing with the options or you can manually edit the new names on the preview screen.
Once you are satisfied with all the nanmes in the list, then press the rename button.

Hope that helps,

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Wed Aug 22, 2012 12:19 pm    Post subject: Reply with quote

Thank you for your reply.

I was able to follow all the steps until you got to step 3 ie:

Force Case All Words.

After that I am all lost. So How can use this function to force all letter inside the brackets () to be upper case.

A sample or anyother pointer would be so useful.

Many thanks.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Aug 22, 2012 2:48 pm    Post subject: Reply with quote

OK - If the rule is to change everything in parentheses to upper case then it becomes more complicated.
Below is an example that might work (again copy everything to specified rows/columns except for the single quotes):

Row: 1
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*Prefix*'
Row: 2
Search: '^(.*)(\(.*\)).avi'
Replace: '\1.avi.\2'
Row: 3
Search:
Replace: '*Upper Case in*Extension*'
Row: 4
Search: '^(.*).avi.(.*)'
Replace: '\1 \2.avi'

I have assumed that the extension of the filenames is '.avi'. if it something else then just replace the '.avi' in all the rows with the correct extension. If there is no extension, then just remove the '.avi' from all the rows.

Let me know if there are any other issues and if there are, then please provide a list with specific examples of before + after names (including the extensions).

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Wed Aug 22, 2012 4:19 pm    Post subject: Reply with quote

Peter

We are almost there, thank you.

Since I am replacing the names of a folder I do not have any extensions as such.

Hence my modification to your codes is as follows:

Row: 1
Search:
Replace: '*Title Case (Also Deletes Extra Whitespace) in*Prefix*'
Row: 2
Search: '^(.*)(\(.*\))'
Replace: '\1.\2'
Row: 3
Search:
Replace: '*Upper Case in*Extension*'
Row: 4
Search: '^(.*).(.*)'
Replace: '\1\2

Before:

Smith, TOM DICk HaRRY (TdHs-123-C1-sta)

After

Smith, Tom Dick Harry .(TDHS-123-C1-STA)

As you can see I still have the full stop or period '.' in my folders name

How may I get rid of that?

TIA.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Aug 22, 2012 4:47 pm    Post subject: Reply with quote

I made a minor error.
You need to add the '\' character before the second dot in the search column of row 4 as shown below:


Row: 4
Search: '^(.*)\.(.*)'
Replace: '\1\2

Hope that helps.

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Thu Aug 23, 2012 1:10 pm    Post subject: Reply with quote

Peter you are a genius!!

Thank you. This problem is Solved.

May I ask one more question, how can I keep initials as Upper Case.

ie

Smith, John Tim MA (STMAS-100-C1-SM)

using your code as above changes the name to:

Smith, John Tim Ma (STMAS-100-C1-SM)

but the clients initials need to be kept upper case is that possible and if so how?

Thank you.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Thu Aug 23, 2012 3:35 pm    Post subject: Reply with quote

Unless there is a rule that distinguishes a set of initials from the rest of the name, then it is not possible.

e.g. is there an implicit rule that if a name has 4 words, then the 4rth word is always an initial that should be kept upper case? ILf so, then there is a way to keep the 4rth word as upper case.

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Fri Aug 24, 2012 11:31 am    Post subject: Reply with quote

Peter

Unfortunately there is no such rule, the folders are named after the client's name and some clients just have initials not names per se. Others have very long names and for clarity the last few names are abbreviated.

These abbreviations occur at the end next to the start bracket (

The brackets (...) contain the case ref number made up of the client's initials and his case number.

The fact that these occur next to the start bracket does that constitute a rule?

Also what is the considered wisdom if I was to make all of folder's names upper case?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sun Aug 26, 2012 5:51 pm    Post subject: Reply with quote

If there are no consistent *rules* that can be applied then I think you have to accept the limitations of what renaming tools can do for cases like this.
Even if someone made a specialized plugin for Pfrank that analyzed the initials inside the brackets to determine which parts of the name were middle names I think there would still be problems as the few examples that were given also have inconsistent initials.

In my opinion, the resulting names are better than what you had. But if you think all upper case would be even better then that is up to you. It's all a matter of personal preferences.

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



Joined: 17 Aug 2012
Posts: 7

PostPosted: Tue Aug 28, 2012 9:26 am    Post subject: Reply with quote

Peter

You are still genius!! and thank you for all your help and once again thank you for this wonderful tool.
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