How to qualify %_extension%

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. :slight_smile:

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.

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

Thanks guys. Both solutions working perfectly! :slight_smile: