# Using Directory Path to update tags

**URL:** https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099
**Category:** Support
**Created:** [February 16, 2012, 12:28am UTC](https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099 "2012-02-16T00:28:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oublie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/c4cdca/32.png) [@oublie](https://community.mp3tag.de/u/oublie)
#### Post date: [February 16, 2012, 12:28am UTC](https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099/1 "2012-02-16T00:28:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [February 16, 2012, 12:50am UTC](https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099/2 "2012-02-16T00:50:25Z")

</div>

The simplest tool here is the Filename-Tag Converter ![:mt_ftt:](https://community.mp3tag.de/uploads/default/original/1X/6ab8d95b0c2a82cb4f9b0eb16ea87ad3a6575015.png ":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)

---

<div class="post-metadata">

### Author: ![oublie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/c4cdca/32.png) [@oublie](https://community.mp3tag.de/u/oublie)
#### Post date: [February 16, 2012, 1:05am UTC](https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099/3 "2012-02-16T01:05:39Z")

</div>

Pone Your a Star I think i was trying to be too clever ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:") Appreciate the help!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/using-directory-path-to-update-tags/13099/4 "2026-02-09T12:23:40Z")

</div>


