# How to qualify %\_extension%

**URL:** https://community.mp3tag.de/t/how-to-qualify-extension/67250
**Category:** Support
**Created:** [January 23, 2025, 4:24am UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250 "2025-01-23T04:24:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [January 23, 2025, 4:24am UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250/1 "2025-01-23T04:24:27Z")

</div>

Hi All

I have an action to name folders by Year - Album - Extension

Field :\_DIRECTORY

Format String :%year% %album% (%\_extension%)

This works fine. However , I am trying now to only add the extension if it is .wav.

Is it possible to do this?

Grateful for any advice. 🙂

---

<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: [January 23, 2025, 7:22am UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250/2 "2025-01-23T07:22:42Z")

</div>

> [@chayes](#):
>
> %year% %album% (%\_extension%)

You could try (if you only want to add `.wav` as extension)  
Format string:  
`%year% %album% $if($eql(%_extension%,wav),(.wav),)`  
or  
Format string:  
`%year% %album% $if($eql(%_extension%,wav),(%_extension%),)`

**Addition:**  
My above suggestion adds a space after `%album%` in any case (also if there is no `.wav` extension).  
Mp3tag/Microsoft don't let you create folders with a trailing space in its name.  
Therefore you can't create a folder name like  
`2025 Waterloo `  
` ↑`  
You only get the trimmed folder name  
`2025 Waterloo`  
or extended folder name  
`2025 Waterloo (wav)`

In the following suggestion from @ohrenkino the space will only be added if the extension `.wav` exists and ` (.wav)` will be added.

The resulting folder name remains the same in both cases.

---

<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: [January 23, 2025, 7:23am UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250/3 "2025-01-23T07:23:51Z")

</div>

> [@chayes](#):
>
> Format String :%year% %album% (%\_extension%)

Try  
Format String :`%year% %album%$if($eql(%_extension%,wav),' ('%_extension%')',)`

---

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [January 23, 2025, 3:16pm UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250/4 "2025-01-23T15:16:56Z")

</div>

Thanks guys. Both solutions working perfectly! 🙂

---

<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 22, 2025, 3:45pm UTC](https://community.mp3tag.de/t/how-to-qualify-extension/67250/6 "2025-02-22T15:45:42Z")

</div>

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