Tag mp3 from file path

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

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

Artist: David Bowie
Album: Ziggy Stardust

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

Artist: Platinum Collection
Album: CD3

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

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

Artist: David Bowie
Album: Platinum Collection - CD3

Thanks in advance.


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


You may try:

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



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
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.


then I think

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

Must work


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.


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%