# Creating folder names with tags

**URL:** <https://community.mp3tag.de/t/creating-folder-names-with-tags/54219>\
**Category:** Support\
**Created:** [August 29, 2021, 1:00pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219 "2021-08-29T13:00:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![a1recordsandcds](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/58956e/32.png) [@a1recordsandcds](https://community.mp3tag.de/u/a1recordsandcds)\
**Post date:** [August 29, 2021, 1:00pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/1 "2021-08-29T13:00:32Z")

</div>

I would like to automatically create folder names when I use the "Convert Tag to Filename" function. I have figured out the basic method of doing this, but I have ran into a problem that I can't figure out.

I work in radio so most of my files look something like this:

Artist: Maroon 5  
Title: Girls Like You (Radio Edit)  
Album: Girls Like You (Promo CD Single)  
Year: 2020

Artist: Maroon 5  
Title: Girls Like You (Radio Edit - No Rap) (New Master)  
Album: Girls Like You (Promo CD Single)  
Year: 2020

Artist: Maroon 5  
Title: Girls Like You (Instrumental)  
Album: Girls Like You (WAV from label)  
Year: 2020

I have multiple versions of the same title with the version name in parentheses included in the %title% field.

Using the song above as an example, I would like Mp3tag to create one folder called:

Maroon 5 - Girls Like You [2020]

and put all of the various versions of this song into that folder.

The problem I have now is that it creates multiple folders (one for each version) because I can't figure out how to strip out the version number in the folder name.

The string I'm currently using is:

C:\Users\djnic\Desktop\Music%artist% - %title% '['%year%']'%artist% - %title% '['%year%']'

(Note: in my string I have a \ between '['%year%']' and %artist% to separate the folder name and the file name but it gets stripped out when I paste it into this post}

I need to strip out anything in parentheses in the "title" field when it creates the folder name. I want the version name in parentheses to stay in the file name, but not in the folder name.

Any help would be 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:** [August 29, 2021, 1:10pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/2 "2021-08-29T13:10:07Z")

</div>

> [@a1recordsandcds](#):
>
> but it gets stripped out when I paste it into this post

Try to enclose the string in grave accents.

`C:\Users\djnic\Desktop\Music\%artist% - %title% '['%year%']'\%artist% - %title% '['%year%']'`  
-\>  
`C:\Users\djnic\Desktop\Music\%artist% - $regexp(%title%,'(.*) \(.*',$1) '['%year%']'\%artist% - %title% '['%year%']'`

---

<div class="post-metadata">

**Author:** ![a1recordsandcds](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/58956e/32.png) [@a1recordsandcds](https://community.mp3tag.de/u/a1recordsandcds)\
**Post date:** [August 29, 2021, 1:50pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/3 "2021-08-29T13:50:34Z")

</div>

Bam! Thanks ohrenkino. That did exactly what I wanted! What's your PayPal? I'll send you a few bucks for the help.

---

<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:** [August 29, 2021, 2:08pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/4 "2021-08-29T14:08:34Z")

</div>

Great, when it worked.  
Your gratitude is reward enough for me.  
If you want to donate:  
[https://www.mp3tag.de/en/donations.html](https://www.mp3tag.de/en/donations.html)

---

<div class="post-metadata">

**Author:** ![a1recordsandcds](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/58956e/32.png) [@a1recordsandcds](https://community.mp3tag.de/u/a1recordsandcds)\
**Post date:** [August 29, 2021, 7:17pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/5 "2021-08-29T19:17:27Z")

</div>

I just donated $5 via the link above on your behalf. Thanks again!

One further question, how would I modify this string to remove anything from the title in parentheses. For instance, if a file name has two sets of parentheses like this one:

Girls Like You (Radio Edit) (New Master)

Thanks again

---

<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:** [August 29, 2021, 7:24pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/6 "2021-08-29T19:24:39Z")

</div>

`$regexp(%title%,'(.*?) \(.*',$1)`  
This influences the greadiness of the repetition operators.

---

<div class="post-metadata">

**Author:** ![ojvibes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/d6d6ee/32.png) [@ojvibes](https://community.mp3tag.de/u/ojvibes)\
**Post date:** [October 26, 2023, 12:21pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/7 "2023-10-26T12:21:09Z")

</div>

This modification too can save you time and help you sort out your music.  
`C:\Users\USER1\Documents\Soulseek Downloads\complete\Ferre Gola\%year% - $regexp(%album%,'(.*) \(.*',$1)[]\$num(%track%,2) - %title%`

---

<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:** [October 26, 2023, 12:37pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/8 "2023-10-26T12:37:23Z")

</div>

> [@ojvibes](#):
>
> This modification too can save you time and help you sort out your music

Which is only true if you are called USER1 and save your audio files in the documents folder ...  
The regular expression depends a lot on the found pattern in the source data. So without that information, it is hard to say whether the regular expression is useful.

---

<div class="post-metadata">

**Author:** ![ojvibes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/d6d6ee/32.png) [@ojvibes](https://community.mp3tag.de/u/ojvibes)\
**Post date:** [October 26, 2023, 2:05pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/9 "2023-10-26T14:05:33Z")

</div>

Yes......with the location and folder name,`(\%year% - $regexp(%album%,'(.*) \(.*',$1)[]\$num(%track%,2) - %title%)`

---

<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:** [November 25, 2023, 2:06pm UTC](https://community.mp3tag.de/t/creating-folder-names-with-tags/54219/10 "2023-11-25T14:06:04Z")

</div>

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