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 

Conditional Renaming

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



Joined: 02 Jul 2011
Posts: 1

PostPosted: Sat Jul 02, 2011 11:32 pm    Post subject: Conditional Renaming Reply with quote

I've been using PFrank for quite a while, and I usually manage to muddle through and find a solution to my problems eventually, but I'm truly stumped on this one. What I want to do seems to be pretty simple, but I can't figure it out. I have many files setup like this:

The Crests - The Angels Listened In.mp3

What I want to be able to do is take all file names in a folder that start with 'The' and change them to this format:

Crests, [The] - The Angels Listened In.mp3

I only want the expression to work on those files that start with 'The' and leave the others alone.
I can get the 'The' removed just fine by searching on '^The' but no matter what I try every file in the folder ends up with ', [The]' after the artist.
Any ideas? Thanks in advance.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Sun Jul 03, 2011 5:15 pm    Post subject: Reply with quote

Copy the following into the renaming creator (do not copy the single quotes).

Row: 1
Search: '^The(.*)[-](.*)'
Replace: '\1, [The] - \2'
Row: 2
Search:
Replace: '*Delete All Extra Whitespace in*Prefix*'
Row: 3
Search: '[ ]*,'
Replace: ','


The second and third rows are required ot clean up extra whitespace.
If you like you can also set the name filter to 'The*' to prevent non-The starting files to not be affected by rows 2 and 3.

Hope that helps.

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



Joined: 12 Oct 2008
Posts: 3

PostPosted: Sat Jul 09, 2011 2:36 am    Post subject: Conditional Renaming Reply with quote

Now that I've seen it, it makes sense. Don't know why I couldn't figure it out, I've used the field swap a million times. DUH!
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