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 

Removing the first '-' only

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



Joined: 23 Jan 2010
Posts: 2

PostPosted: Sat Jan 23, 2010 5:26 pm    Post subject: Removing the first '-' only Reply with quote

ok, so my file name looks either like this

- file - name.mp3

or

-file - name.mp3

what i want it to look like is

file - name.mp3

i.e. only remove the first hyphen and/or space.

what i have is \-. but that removes ALL hyphens, which i don't want... any ideas?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Sat Jan 23, 2010 8:04 pm    Post subject: Reply with quote

Hi,

You can use the counter extension I added for regular expressions. P Paste the following into the search column (without the single quotes):

'(?1)\-'

This will replace the first dash character with whatever you put in the replace column.

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



Joined: 18 Aug 2010
Posts: 2

PostPosted: Wed Aug 18, 2010 12:17 pm    Post subject: Reply with quote

I tried that and it still wants to remove the second instance of the "-". Am I missing something? It shows in the preview that its going to do what I want but when I run it it doesn't. What if I just want to remove the "-". How do I just delete and not replace?
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Wed Aug 18, 2010 2:30 pm    Post subject: Reply with quote

Hi,

Using the (?1)\-' expression in the search field should work (without inlcuding the single quotes). If it works for the preview panel it has to work for the preview page.
To delete the '-', just leave the replace field empty.

Would you please send me your 'Config' file so I can have a look at it - the file can be found in the Application Data\PFrank folder

e.g. for XP:
C:\Documents and Settings\peter\Application Data\PFrank\Config

The location is similar for Vista/WIndows7

Peter.


Last edited by admin on Wed Aug 18, 2010 3:44 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tbabyren



Joined: 18 Aug 2010
Posts: 2

PostPosted: Wed Aug 18, 2010 2:59 pm    Post subject: Reply with quote

I also don't want instances of only 1 "-" being changed but I got it to work by selecting the files I didn't want changed and removing them from the list but is there a faster way to exclude files with only 1 "-" I still have another 30,000 songs to go through. Much appreciated on response time!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Wed Aug 18, 2010 3:46 pm    Post subject: Reply with quote

OK - you wouldl also need to use the name filter to pre-filter names to eliminate names that only have 1 dash.

Set the name filter to:

*-*-*

And then scan.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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