You are not logged in.
Pages: 1
Hello
I am trying to rename many music files and have come across a problem that hopefully someone can give me guidance on.
My files are named as follows.
'Artist' - 'Album' 'Track' 'Track Name' eg Mahavishnu Orchestra - Birds of Fire 05 Thousand Island Park
What I am trying to do is replace the Artist and Album seperator with a # and also add a # to the track track number so the renamed file becomes Mahavishnu Orchestra #Birds of Fire #05 Thousand Island Park.
The first seperator is the easy part, but I am having difficulties in getting the track renamed.
I had been using the Replace rule [in a particularly long handed method] to look for 01 and change it to #01 and so on up to about 30. But what's happening is that there are many files using numbers in the Track Names that are also getting changed. eg Pink Floyd - Piper at the Gates of Dawn 09 Chapter 24 becomes [using my flawed methodology] Pink Floyd - Piper at the Gates of Dawn #09 Chapter #24
Is there a way that I can get Renamer to do this. There must be a way but I am too seriously dumb to figure it out. Any advice will be most welcome.
Offline
Actually, since you have already created replace rules to prefix all 01..30 with #, you can simply use "Occurrences: First" option to affect only the first occurrence. This will fix your "#09 Chapter #24" case.
All those replace rules can be replaced with a single RegEx rule, i.e. Expression: \b(\d\d)\b Replace: #$1 -- but unfortunately RegEx rule doesn't have that "first occurrences only" option. You could then remove all but the first # characters. This is just an idea tho.
Offline
Actually, since you have already created replace rules to prefix all 01..30 with #, you can simply use "Occurrences: First" option to affect only the first occurrence. This will fix your "#09 Chapter #24" case.
All those replace rules can be replaced with a single RegEx rule, i.e. Expression: \b(\d\d)\b Replace: #$1 -- but unfortunately RegEx rule doesn't have that "first occurrences only" option. You could then remove all but the first # characters. This is just an idea tho.
What about something like this?
Expression: ^(.*?\b)(\d\d)(\b.*)$
Replace: $1#$2$3
I'm not very used to use boundaries, so I decided to include it again on the file name
Are there any cases where using boundaries can remove characters?
Last edited by SafetyCar (2009-11-13 20:13)
If this software has helped you, consider getting your pro version. :)
Offline
Thank you for the suggestions. I shall have a play today and let you know how I got on.
Offline
Well I've had a play with circa 6,000 files. Using SafetyCar's slightly modified expression ^(.*?\b) (\d\d )(\b.*)$ replaced with $1 #$2$3 is providing the better results. It is not 100% correct because of the naming of the files but its very close.
Now and then half the file is renamed properly, but the other half remains untouched. So using 2 instances of Renamer open at the same time, I use den4b's suggestion in the other instance and get the best of both worlds.
There are a few anomalies, but overall I am very happy. Only another circa 80,000 files to go .... and then I start on the photographs!!
Thank you very much.
It would appear that 99% of the anomalies I mentioned have a consistency. If the track number in the file name is followed by a space then something in square brackets the file does not rename. eg
Traffic - John Barleycorn Must Die 04 [Bonus Track] I Just Want You To Know
Mmmm. Not a major issue but if there is a modified exception I'm all ears.
Last edited by elton (2009-11-14 14:43)
Offline
ummm, the \b (boundary) represents a change between a letter and other type of symbols, so maybe what you want to do is use the space instead of the "boundaries"
So, I think what you wanted to do is this:
Expression: ^(.*? )(\d\d)( .*)$
Replace: $1#$2$3
If this software has helped you, consider getting your pro version. :)
Offline
Oh, way to go SafetyCar absolutely spot on.
I am very grateful.
Offline
Pages: 1