# Rename folders and add a tag suffix

**URL:** https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064
**Category:** Support
**Created:** [November 5, 2010, 9:47am UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064 "2010-11-05T09:47:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![The-Lion](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@The-Lion](https://community.mp3tag.de/u/The-Lion)
#### Post date: [November 5, 2010, 9:47am UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/1 "2010-11-05T09:47:21Z")

</div>

Hi,

I want to rename the folder containing the mp3 files to [%year%] %album%.  
e.g.: [2010] Recovery

So I made this action: Format value "\_DIRECTORY": [%year%] %album%.  
But the [and] characters aren't written! How do I fix that?

Another problem, I want my files to have ( ) around featurings.  
e.g.: Rihanna - Love The Way You Lie Pt. 2 (feat. Eminem)

So I made this action: Replace "Feat." --\> "(feat.".  
But how do I get the ) character at the end of the field?

Thanks!

---

<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: [November 5, 2010, 10:26am UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/2 "2010-11-05T10:26:36Z")

</div>

> [@The-Lion](#):
>
> So I made this action: Format value "\_DIRECTORY": [%year%] %album%.  
> But the [and] characters aren't written! How do I fix that?

put them in single 'quotationmarks'  
'['%year%']' %album%

> [@](#):
>
> Another problem, I want my files to have ( ) around featurings.  
> e.g.: Rihanna - Love The Way You Lie Pt. 2 (feat. Eminem)
> 
> So I made this action: Replace "Feat." --\> "(feat.".  
> But how do I get the ) character at the end of the field?

$ represents the end of a line in regular expressions. So use:  
Action: Replace with regular expression  
Field: \_FILENAME  
Regular Expression: $  
Replace with: )

EDIT:  
a quick test showed that this gives you .mp3) which i don't understand since I thougt there is a difference between \_filenam and \_filename\_ext.  
Anyway, that makes it even easier. Use:  
Action: Replace  
Field: \_FILENAME  
Original: .mp3  
Replace with: ).mp3

EDIT2:  
for opening and closing bracket in one go:  
Action: Replace with regular expression  
Field: \_FILENAME  
Regular Expression: feat(.\*).(...)  
Replace with: (feat$1).$2

this time not only for .mp3 but for all filetypes with three characters in the file extension, represented by .(...)

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [November 5, 2010, 11:34am UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/3 "2010-11-05T11:34:46Z")

</div>

Since Mp3tag v2.46c \_FILENAME only includes the extension at "Replace with regular expression"

---

<div class="post-metadata">

### Author: ![The-Lion](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@The-Lion](https://community.mp3tag.de/u/The-Lion)
#### Post date: [November 5, 2010, 12:31pm UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/4 "2010-11-05T12:31:59Z")

</div>

Thanks for the help guys!

---

<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: [November 5, 2010, 1:16pm UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/5 "2010-11-05T13:16:19Z")

</div>

> [@dano](#):
>
> Since Mp3tag v2.46c \_FILENAME only includes the extension at "Replace with regular expression"

ah, ok  
that means the replace .mp3 with ).mp3 only works in in "Replace with regular expression" and not in "Replace"

---

<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:22pm UTC](https://community.mp3tag.de/t/rename-folders-and-add-a-tag-suffix/11064/6 "2026-02-09T12:22:39Z")

</div>


