Tag mp3 from file path


#1

Hello all,

I'm sure there's a logical way to do this but i can't figure it out.

I've tagged all my mp3 based on the solution found in
/t/5621/1

For example %Artist%\%Album%\%Title% tagged the file "C:\David Bowie\Ziggy Stardust\track1.mp3" ...

Artist: David Bowie
Album: Ziggy Stardust
Track:Track1

However, (as you'd expect) the path "C:\David Bowie\Platinum Collection\cd3\track1.mp3" tags Track1.mp3 ...

Artist: Platinum Collection
Album: CD3
Track:Track1

Are there any RegExp heads out there that know how to tag the below file in the format detailed below?

Path:
C:\David Bowie\Platinum Collection\cd3\track1.mp3

Artist: David Bowie
Album: Platinum Collection - CD3
Track:Track1

Thanks in advance.


#2

Hi,

Does %artist%\%album%\CD%discnumber%\%title% help? But this needs the extended Tag discnumber to be filled in. (You get Extended Tags by pressing ALT - T or via View - Extended Tags

Regards
Michael


#3

You may try:

%Artist%\$regexp(%Album%,^(.+) - (CD\d+)$,$1)\$lower($regexp(%Album%,^(.+) - (CD\d+)$,$2))\\%Title%

DD.20080217.1651.CET


#4

Ok,

I've tried the first solution using the discnumber tag. It almost meets my requirements, the only thing that's missing is the numbering on the album tag. For example:

Album: Platinum Collection
Not
Album: Platinum Collection - CD3

Thanks Mike_nl.

The second solution returns the following:

Artist: C:
Title: track1

DetlevD, Have you missed something in your RegExp?

Thanks (again) in advance.


#5

Hi,

then I think

%artist%\%album% CD %Discnumber%\%title%

Must work

Regards
Michael


#6

Hmm, I thought you have a tagfield named ALBUM which contains for example such a string like 'Platinum Collection - CD3', that means, this string has two parts connected by a space-hyphen-space sequence, so that:
'$regexp(%Album%,^(.+) - (CD\d+)$,$1)$lower($regexp(%Album%,^(.+) - (CD\d+)$,$2))'
will result in:
'Platinum Collection\cd3'.
This case has been prooved to be correct.

DD.20080217.1944.CET

Hmm ... I did misunderstand OP Kirkski request and proposed a format string on the base of already proper filled tag-fields, but the OP wanted to split the filepath into its components to be stored in the tag-fields, with the special need to combine some splitted values into one tag-field, just in one process.

User Mike_nl in post #2 gave the solution to fill the path component "CD number" into the tag-Field DISCNUMBER.
That is the right way.

In a following step both values from the ALBUM tag-field and from the DISCNUMBER tag-field can be combined into the ALBUM tag-field.
Action: Format value
Field: ALBUM
Formatstring: %ALBUM%' - CD'%DISCNUMBER%

DD.20111109.0816.CET