Get tags from filename question!


#1

Hi,
I,ve got several mp3 files whithout any tags, so i need to read them from the filename. But they're kinda strange formatted and i have no clue how to get the values without manual editing them later.
The filename is formatted like this: %artist%-%album%-%track%%title%. So my first problem is the missing spaceholder between track and title (track always contains two numbers). But the worst to come, the title doesn't conatin spaceholders between the words either! every word starts uppercase.
Please, help me with this, manual editing takes much too long!
Thanks a lot!


#2

How's this... Create a new action group with the following actions:

Action #1:
Action type: Guess values
Source format: %_filename%
Guessing pattern: %artist%-%album%-%track%%title%

Action #2:
Action type: Format value
Field: TRACK
Formatstring: $left(%title%,2)

Action #3:
Action type: Replace with regular expressions
Field: TITLE
Regular expression: ^\d{2}
Replace matches with:

[ ] case-sensitive comparison

Action #4:
Action type: Replace with regular expressions
Field: TITLE
Regular expression: (\l)(\u)
Replace matches with: $1 $2

[x] case-sensitive comparison

#3

Well, thanks a lot for your quick reply, but there are still some problems. In case that there's a leading A or I, MP3Tag doesn't insert a blank, this problem also appears with punctuation marks. For example "A Test", "I Test" or "I, Test". Not that I'm an perfectionist, just a bit lazy (:


#4

Well, I can easily adapt it to add a blank before every uppercase letter, but that would change the song "Last Night A DJ Saved My Life" into "Last Night A D J Saved My Life" --> notice how "DJ" turns to "D J".


#5

Didn't reason that! Thanks (:


#6

If you don't mind the DJ thing, you can take (\w|,)(?=\u) instead of (\l)(\u)