View previous topic :: View next topic |
Author |
Message |
ExNavy
Joined: 02 Jul 2011 Posts: 1
|
Posted: Sat Jul 02, 2011 11:32 pm Post subject: Conditional Renaming |
|
|
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 |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Sun Jul 03, 2011 5:15 pm Post subject: |
|
|
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 |
|
|
ExNavy91
Joined: 12 Oct 2008 Posts: 3
|
Posted: Sat Jul 09, 2011 2:36 am Post subject: Conditional Renaming |
|
|
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 |
|
|
|