# Getting album title and year from filepath

**URL:** <https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180>\
**Category:** Support\
**Created:** [August 23, 2021, 8:58pm UTC](https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180 "2021-08-23T20:58:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanmechelen](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stefanmechelen/32/5195_2.png) [@stefanmechelen](https://community.mp3tag.de/u/stefanmechelen)\
**Post date:** [August 23, 2021, 8:58pm UTC](https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180/1 "2021-08-23T20:58:07Z")

</div>

Getting year from filepath (keep in mind NOT filename)  
And also getting title from filepath

Y:\muziek\Te verwerken muziek\Kuschelrock Complete Flac Collection\Kuschelrock Volume 1-33 flac\KuschelRock 01 [2CD] (1987)\CD 1\

I'm interessed in KuschelRock 01 as album title and in 1987 as year.

Filepath has always same length only changes into \cd2 or \cd3 and the number of the record of course (goes to 33, so we're good with 2 characters)

---

<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:** [August 23, 2021, 10:05pm UTC](https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180/2 "2021-08-23T22:05:57Z")

</div>

You can use Convert Filename -\> Tag (yes I know, you want the filepath)  
(ALT + 2)

and then enter this Format string:  
`%album% %album% %dummy% (%year%)\%dummy%\%track% - %title%`

![image](https://community.mp3tag.de/uploads/default/original/2X/a/aa2379cd46c42d9752a382890972c49bb3488864.png)

If you don't want the track-number and title you can replace the last two placeholders with `%dummy%` too.

Explanation:  
The first `%album%` get KuschelRock  
The second `%album%` get the additional 01  
The first `%dummy%` get [2CD]  
(`%year%`) get 1987  
The second `%dummy%` get CD 1  
`%track%` would contain anything before the -  
`%title%` would contain everything after the -

The length of your filepath does not have to be always the same. You have to check if the %dummy% placeholder and the space separators matches your existing parts in the filepath, including the backslashes.

The big advantage using the Convert Filename -\> Tag is the Preview.  
(The fields above the button Preview to be exact).  
You can immediately see if your placeholders matches your filepath and contains the wanted parts.

---

<div class="post-metadata">

**Author:** ![stefanmechelen](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stefanmechelen/32/5195_2.png) [@stefanmechelen](https://community.mp3tag.de/u/stefanmechelen)\
**Post date:** [August 24, 2021, 6:10am UTC](https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180/3 "2021-08-24T06:10:57Z")

</div>

> [@LyricsLover](#):
>
> %album% %album% %dummy% (%year%)%dummy%%track% - %title%

oh allright, that makes sense, didn't know it worked for filepath also and that it works from the directory, that was my mistake, I tried it myself and failed

thx, you just save me a whole lot of work

---

<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:** [September 23, 2021, 6:11am UTC](https://community.mp3tag.de/t/getting-album-title-and-year-from-filepath/54180/4 "2021-09-23T06:11:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
