# Condtional Format String possible ?

**URL:** https://community.mp3tag.de/t/condtional-format-string-possible/7713
**Category:** Support
**Created:** [January 6, 2009, 3:43pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713 "2009-01-06T15:43:30Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![k000](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/53a042/32.png) [@k000](https://community.mp3tag.de/u/k000)
#### Post date: [January 6, 2009, 3:43pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/1 "2009-01-06T15:43:30Z")

</div>

Does anyone know if it is possible to use one Conditional Format String action ? I basically want to change teh 'band' value on tons of songs, but I want it to be changed only for certain genres.

I would like to have the Band name be equal to the Artist if the Genres are one of the few I ahve, and I would like to have Band value be equal to Album for some other etc.

Is it possible to automate ?

---

<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: [January 6, 2009, 8:36pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/2 "2009-01-06T20:36:37Z")

</div>

The basic is

_Action type:_ **Format value**  
_Field:_ **BAND**  
_Formatstring:_ **$if($or($eql(%genre%,Rock),$eql(%genre%,Pop)),%artist%,%band%)**

---

<div class="post-metadata">

### Author: ![k000](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/53a042/32.png) [@k000](https://community.mp3tag.de/u/k000)
#### Post date: [January 7, 2009, 4:01am UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/3 "2009-01-07T04:01:50Z")

</div>

Thanks. Sounds like you are saying if genre equals Rock or Pop, then band = artist. can I also add else clause in this or do I have to add a separate action for that ?

---

<div class="post-metadata">

### Author: ![aladoro](https://community.mp3tag.de/user_avatar/community.mp3tag.de/aladoro/32/64_2.png) [@aladoro](https://community.mp3tag.de/u/aladoro)
#### Post date: [January 7, 2009, 6:42am UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/4 "2009-01-07T06:42:49Z")

</div>

instead of creating a conditional action, you simply could sort/filter your songs by genre, select the ones you want + apply a simple format value action !?

HTH, andreas

---

<div class="post-metadata">

### Author: ![k000](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/53a042/32.png) [@k000](https://community.mp3tag.de/u/k000)
#### Post date: [January 7, 2009, 12:54pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/5 "2009-01-07T12:54:42Z")

</div>

True - that is what I have been doing, but if I have a fully working action with conditions than it makes it all the mroe simple to when I work with batches of folders that I am cleaning up (for my Zune)

---

<div class="post-metadata">

### Author: ![Harakiri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/harakiri/32/142_2.png) [@Harakiri](https://community.mp3tag.de/u/Harakiri)
#### Post date: [January 7, 2009, 11:13pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/6 "2009-01-07T23:13:43Z")

</div>

Hello there!

I've been following this topic and found it quite substantial regarding to one of the few actions that i wanted to "build".

**I want to create a conditional string in order to rename directories in this fashion:**

If album contains "several artists" then \_DIRECTORY: VA - %ALBUM% (%YEAR%)

OR

If album contains a "single artist" then \_DIRECTORY: %ARTIST% - %ALBUM% (%YEAR%)

...

Probably a simple conditional regex but i can't figure out how to write it. Can anyone help me please? 🙂

Thanks in advance!

---

<div class="post-metadata">

### Author: ![k000](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/53a042/32.png) [@k000](https://community.mp3tag.de/u/k000)
#### Post date: [January 8, 2009, 5:16pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/7 "2009-01-08T17:16:54Z")

</div>

I've ended up aking two separate actions, one for BAND = Artist, and anotehr BAND = Album, and pick and choose one of them for every directory that I clean up.

But would love to add the "if then else" in one action itself..

---

<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: [January 8, 2009, 8:51pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/8 "2009-01-08T20:51:03Z")

</div>

The else part is where I wrote %band%

So you just have to repeat the whole thing:  
$if($or($eql(%genre%,Rock),$eql(%genre%,Pop)),%artist%,$if($or($eql(%genre%,Jazz),$eql(%genre%,Metal)),%album%,%band%))

@Harakiri:  
It's not possible to check if an album has one or several artists within an action.  
But it's possible with the export, generate a txt file and import it back to the tags, then rename based on the new tags.

---

<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:21pm UTC](https://community.mp3tag.de/t/condtional-format-string-possible/7713/9 "2026-02-09T12:21:17Z")

</div>


