# Any scripted way to extract Album and Artist from the Path field?

**URL:** https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306
**Category:** Support
**Created:** [November 30, 2021, 8:48pm UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306 "2021-11-30T20:48:52Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![BTCambs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@BTCambs](https://community.mp3tag.de/u/BTCambs)
#### Post date: [November 30, 2021, 8:48pm UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/1 "2021-11-30T20:48:52Z")

</div>

I don't think any of the Converters can do this, and I can't follow the pages on Regular Expressions...but am I correct to think that the info in the Path field is out of bounds to MP3Tag - in other words, it can't be pulled into the Album and Artist fields?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [November 30, 2021, 8:51pm UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/2 "2021-11-30T20:51:25Z")

</div>

> [@BTCambs](#):
>
> am I correct to think that the info in the Path field is out of bounds to MP3Tag

Far from it.  
See the [FAQs/HowTos](https://community.mp3tag.de/t/converters-to-rename-files-or-to-import-tags/8016/3)

---

<div class="post-metadata">

### Author: ![BTCambs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@BTCambs](https://community.mp3tag.de/u/BTCambs)
#### Post date: [December 1, 2021, 9:12am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/3 "2021-12-01T09:12:00Z")

</div>

Thank-you. I can see how to get the whole path into a field now, but I can't adapt any of the Regular Expressions suggested to select one element from the path into a specific field. I simply don't understand what people here are saying to one another. If I copy and paste the suggestions from these pages I get blanks.

If my path is "D:\Music admin\For archives\Jazz\Randy Weston - African Cookbook (1972)\07 Blues For Five Reasons.mp3" I want to be able to extract "Randy Weston" into Album Artist, "African Cookbook" into Album and "1972" into Year.

I just can't see how to use %dummy% and \ etc. to achieve this.

My shortcoming, I know, but any further tips would be hugely appreciated.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 1, 2021, 9:15am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/4 "2021-12-01T09:15:44Z")

</div>

> [@BTCambs](#):
>
> D:\Music admin\For archives\Jazz\Randy Weston - African Cookbook (1972)\07 Blues For Five Reasons.mp3

Try Converter \> Filename-Tag  
Mask: `D:\Music admin\For archives\Jazz\%albumartist% - %album% (%year%)\%dummy%`  
or even:  
Mask: `D:\Music admin\For archives\%genre%\%albumartist% - %album% (%year%)\%dummy%`  
or even:  
Mask: `D:\Music admin\For archives\%genre%\%albumartist% - %album% (%year%)\%track% %title%`  
BTW: there are not regular expressions involved.

---

<div class="post-metadata">

### Author: ![BTCambs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@BTCambs](https://community.mp3tag.de/u/BTCambs)
#### Post date: [December 1, 2021, 9:48am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/5 "2021-12-01T09:48:15Z")

</div>

Staggering. Thank-you so much: that was really kind of you.

One more question?

If there is extra info at the end of the path as in this case: "D:\Music admin\For archives\Jazz\Edouard Ferlet - Pianoid (2021) [24-96]" - what do I add to the string/phrase (sorry, I don't know what term to use) to get the same info? The strings stop working, presumably because they don't deal with the " [24-96]" segment.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 1, 2021, 9:57am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/6 "2021-12-01T09:57:36Z")

</div>

> [@BTCambs](#):
>
> D:\Music admin\For archives\Jazz\Edouard Ferlet - Pianoid (2021) [24-96]

Perhps this works:  
`Mask: D:\Music admin\For archives\%genre%\%albumartist% - %album% (%year%)%dummy%\%dummy%`  
as this is a different pattern from the one without extra information, you have to treat these files separately.

---

<div class="post-metadata">

### Author: ![BTCambs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@BTCambs](https://community.mp3tag.de/u/BTCambs)
#### Post date: [December 1, 2021, 10:55am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/7 "2021-12-01T10:55:16Z")

</div>

Stunning. I'll try and adapt for other variances instead of troubling you further. You've massively helped - getting the info for untagged albums was the last bit of completely manual copying and pasting I was left with. Thank-you!

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 1, 2021, 11:16am UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/8 "2021-12-01T11:16:06Z")

</div>

> [@BTCambs](#):
>
> I'll try and adapt for other variances instead of troubling you further.

If you follow the advice in the FAQ and use the Convert -\> Filename-Tag you can see the preview immediately:

![image](https://community.mp3tag.de/uploads/default/original/2X/9/986695ad738d36475a64b97b9f62f3d48605893c.png)

In the above example you can see that the non bold field "yearX" is a non standard tag field.

This way you can check exactly if your choosen tags and patterns (aka "format string") match your actual selected path.  
 ![Mp3tag - Format string](https://community.mp3tag.de/uploads/default/original/2X/9/95f74974737974b2b176fc9b868cb91ce5d3404f.gif)

You can adjust your format string until it fits to your needs. For every part in your selected path that you don't want to keep, you can use the `%dummy%` placeholder.

---

<div class="post-metadata">

### Author: ![BTCambs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@BTCambs](https://community.mp3tag.de/u/BTCambs)
#### Post date: [December 1, 2021, 3:28pm UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/9 "2021-12-01T15:28:23Z")

</div>

🙂 Thank-you for your kind help too!

---

<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:29pm UTC](https://community.mp3tag.de/t/any-scripted-way-to-extract-album-and-artist-from-the-path-field/55306/10 "2026-02-09T12:29:33Z")

</div>


