# Convert Tag - Filename: Possible to leave out values if tag field is emtpy?

**URL:** https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815
**Category:** Support
**Created:** [November 29, 2007, 9:41am UTC](https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815 "2007-11-29T09:41:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eXplicit](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/71c47a/32.png) [@eXplicit](https://community.mp3tag.de/u/eXplicit)
#### Post date: [November 29, 2007, 9:41am UTC](https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815/1 "2007-11-29T09:41:00Z")

</div>

Hi all,

I tried to find the answer to my question, but was unable to. Maybe someone readily knows the answer!

I am starting to use the 'Band' (Album Artist) field, specifically for Mixed Albums, whereby the DJ is the Album Artist and per track Artists may differ. Now, for these instances, I want to convert the Tags to filenames like so:

%album% (%band%) - $num(%track%,2) - %artist% - %title%

Since I have many albums already tagged where %artist% equals %band%, I only want to include %band% in the filename when the tag field is not empty.

So, the question is: in the string above for converting tags to filename, is there a possibility to only include the value of the band tag ( **including the brackets** ) when this field is not empty?

Thanks!

**EDIT:**  
Guys, after having looked around a bit further I managed to answer my own question:

%album%[(%band%)] - $num(%track%,2) - %artist% - %title%

Cheers!

---

<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: [November 29, 2007, 9:58am UTC](https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815/2 "2007-11-29T09:58:50Z")

</div>

See help file/Scripting functions:  
**[...] The contents of brackets are displayed only if at least one of the placeholders used inside the brackets has been found.**

Try this:  
%album% [(%band%)]- $num(%track%,2) - %artist% - %title%

DD.20071129.1159.CET

---

<div class="post-metadata">

### Author: ![eXplicit](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/71c47a/32.png) [@eXplicit](https://community.mp3tag.de/u/eXplicit)
#### Post date: [November 29, 2007, 10:00am UTC](https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815/3 "2007-11-29T10:00:08Z")

</div>

> [@DetlevD](#):
>
> See help file/Scripting functions:  
> **[...] The contents of brackets are displayed only if at least one of the placeholders used inside the brackets has been found.**
> 
> Try this:  
> %album% [(%band%)] - $num(%track%,2) - %artist% - %title%
> 
> DD.20071129.1159.CET

Hey DetlevD,

Thanks, I already found out about this! Works great!

Cheers

---

<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:20pm UTC](https://community.mp3tag.de/t/convert-tag-filename-possible-to-leave-out-values-if-tag-field-is-emtpy/5815/4 "2026-02-09T12:20:37Z")

</div>


