Using Directory Path to update tags

Hi This is my first post - ive just stared using mp3tag and i'm already impressed. I have managed to get quite a lot done in a very short time but now i'm a but stuck.

Essentially i have a number of albums without proper tags but that have the correct info stored in the file path and filename

e.g.

J:\MUSIC\Tom Waits\Tom Waits 1992-2002\Mule Variations\01-Big in Japan.mp3
DISK\DIRECTORY\DIRECTORY\COLLECTION DIRECTORY\ALBUM DIRECTORY\FILENAME

I would like to take this info and update the tags for the relevant fields for example

%dummy%\%dummy%\%dummy%\%dummy%\%ALBUM%\%TRACK%-%TITLE%

I have tried but i'm not sure how to do it right - obviously i have other longer and shorter directory structures but i'm sure if i got one working i could change the code as necessary. Would this be done in an action and if so which one and how do i acess path or it it a file to tag thing?

Thanks in advance for any help.

The simplest tool here is the Filename-Tag Converter :mt_ftt:

The formatstring for Mule Variations\01-Big in Japan.mp3 is:
%album%\%track%-%title%

You only need the %dummy% if you want to skip something. e.g.:
%artist%\%dummy%\%album%\%track%-%title%
if you want to skip "Tom Waits 1992-2002" from J:\MUSIC\Tom Waits\Tom Waits 1992-2002\Mule Variations\01-Big in Japan.mp3

The more complicated way would be over actions. One Guess Values action or more Format Value actions.

Action: Guess Value
Sourceformat: %_directory%\%_filename%
Guessing Pattern: %album%\%track%-%title%

or

Action: Format Value
Field: ALBUM
Formatstring: %_directory%
+
Action: Format Value
Field: TRACK
Formatstring: $regexp(%_filename%,(.+)-(.+),$1)
+
Action: Format Value
Field: TITLE
Formatstring: $regexp(%_filename%,(.+)-(.+),$2)

Pone Your a Star I think i was trying to be too clever :rolleyes: Appreciate the help!