# Rename If Extension

**URL:** https://community.mp3tag.de/t/rename-if-extension/17710
**Category:** Support
**Created:** [March 2, 2016, 12:41pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710 "2016-03-02T12:41:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![faisdlair](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@faisdlair](https://community.mp3tag.de/u/faisdlair)
#### Post date: [March 2, 2016, 12:41pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/1 "2016-03-02T12:41:42Z")

</div>

Hi , just want to create an action

I Have several files of different format (dsf,flac,mp3) and want to add to the album title

Add (DSD) when the it's .dsf

Add (24 Bits) when it is .flac and the bitrate is over 2000

I don't like to use Filter add the bottom

Would be faster to create a new action

Thank you

Martin

---

<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: [March 2, 2016, 1:01pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/2 "2016-03-02T13:01:43Z")

</div>

Did you know that there is a field %\_bitspersample% that is probably more accurate than the manual assignment? It does not exist in MP3 files.

Also, there is the the field \_TAG that contains the information FLAC or DSF (i think) so you can add that to the album.  
With these 2 fields you do not have to mess about with the filename.

---

<div class="post-metadata">

### Author: ![faisdlair](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@faisdlair](https://community.mp3tag.de/u/faisdlair)
#### Post date: [March 2, 2016, 1:27pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/3 "2016-03-02T13:27:39Z")

</div>

Look what i have in Tag for .dsf

 ![](https://community.mp3tag.de/uploads/default/original/2X/0/0b12c46916b523a6790dfb8cc69356edc65c0bc3.jpg)

---

<div class="post-metadata">

### Author: ![faisdlair](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@faisdlair](https://community.mp3tag.de/u/faisdlair)
#### Post date: [March 2, 2016, 1:47pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/4 "2016-03-02T13:47:25Z")

</div>

> [@ohrenkino](#):
>
> Did you know that there is a field %\_bitspersample% that is probably more accurate than the manual assignment? It does not exist in MP3 files.
> 
> Also, there is the the field \_TAG that contains the information FLAC or DSF (i think) so you can add that to the album.  
> With these 2 fields you do not have to mess about with the filename.

Ok but how to add it to the album  
I Have to create an action but do not know how

Martin

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [March 2, 2016, 3:55pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/5 "2016-03-02T15:55:43Z")

</div>

> [@faisdlair](#):
>
> ... I Have to create an action but do not know how ...

**Convert "Tag - Tag" ... or ... Action "Format value" Field ......: ALBUM Formatstring: %ALBUM%$ifgreater(%\_bitrate%,2000,$if($eql('FLAC',$upper(%\_extension%)),' (24 Bits)',),)$if($eql('DSF',$upper(%\_extension%)),' (DSD)',) ... or ... Formatstring: %ALBUM%$if($eql('FLAC',$upper(%\_extension%)),' ('%\_bitspersample%' Bits)',)$if($eql('DSF',$upper(%\_extension%)),' (DSD)',)**

DD.20160302.1815.CET

---

<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: [March 2, 2016, 3:58pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/6 "2016-03-02T15:58:32Z")

</div>

> [@faisdlair](#):
>
> Ok but how to add it to the album  
> I Have to create an action but do not know how
> 
> Martin

See the FAQs for that:  
[/t/967/1](https://community.mp3tag.de/t/967/1)

The 3rd example is how to append a string to a field. Instead of the example "xyz" use the field variable, probably %\_tag% and/or %\_bitspersample%.

If you enclose the %\_bitspersample% in square brackets, [%\_bitspersample%] it gets treated like an "if" condition.

---

<div class="post-metadata">

### Author: ![faisdlair](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@faisdlair](https://community.mp3tag.de/u/faisdlair)
#### Post date: [March 2, 2016, 4:24pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/7 "2016-03-02T16:24:19Z")

</div>

> [@ohrenkino](#):
>
> See the FAQs for that:  
> [/t/967/1](https://community.mp3tag.de/t/967/1)
> 
> The 3rd example is how to append a string to a field. Instead of the example "xyz" use the field variable, probably %\_tag% and/or %\_bitspersample%.
> 
> If you enclose the %\_bitspersample% in square brackets, [%\_bitspersample%] it gets treated like an "if" condition.

Ok Tried it

It doens't work

![](https://community.mp3tag.de/uploads/default/original/2X/a/a6fd70b4b8260883a5a791ebf9a14a2f98deefa4.jpg)

---

<div class="post-metadata">

### Author: ![faisdlair](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@faisdlair](https://community.mp3tag.de/u/faisdlair)
#### Post date: [March 2, 2016, 6:48pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/8 "2016-03-02T18:48:38Z")

</div>

> [@DetlevD](#):
>
> **Convert "Tag - Tag" ... or ... Action "Format value" Field ......: ALBUM Formatstring: %ALBUM%$ifgreater(%\_bitrate%,2000,$if($eql('FLAC',$upper(%\_extension%)),' (24 Bits)',),)$if($eql('DSF',$upper(%\_extension%)),' (DSD)',) ... or ... Formatstring: %ALBUM%$if($eql('FLAC',$upper(%\_extension%)),' ('%\_bitspersample%' Bits)',)$if($eql('DSF',$upper(%\_extension%)),' (DSD)',)**
> 
> DD.20160302.1815.CET

Thank you It works

---

<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:26pm UTC](https://community.mp3tag.de/t/rename-if-extension/17710/9 "2026-02-09T12:26:07Z")

</div>


