# export by genre

**URL:** https://community.mp3tag.de/t/export-by-genre/3497
**Category:** Export
**Created:** [June 26, 2006, 2:32pm UTC](https://community.mp3tag.de/t/export-by-genre/3497 "2006-06-26T14:32:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![astrohip](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astrohip/32/18205_2.png) [@astrohip](https://community.mp3tag.de/u/astrohip)
#### Post date: [June 26, 2006, 2:32pm UTC](https://community.mp3tag.de/t/export-by-genre/3497/1 "2006-06-26T14:32:36Z")

</div>

Hi, long-time user (many years), first time poster.

I recently started using MP3TAG for exporting also; I have used it for years for tagging. I took some exports I found in these forums, and customized them for my own uses. Many thanks to you experts who posted your export creations! 😃

What I can't figure out is how to create a loop that only shows a certain match. I can do loops, and even figured out how to sort the loop. But what if I only want to export if the genre is "XXX"?

Right now, to do this, I have been exporting sorted on genre, then editing the HTML file and deleting all but the genre I want. But surely there is a way to limit the loop to only a specific criteria.

Thanks in advance; I LOVE this program.

Stuart  
Houston TX USA

PS: Here is a link to the pages I have created with exports:  
[http://texasfeldmans.com/pages/stuart/music.htm](http://texasfeldmans.com/pages/stuart/music.htm)

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [June 27, 2006, 6:07am UTC](https://community.mp3tag.de/t/export-by-genre/3497/2 "2006-06-27T06:07:54Z")

</div>

You mean something like this:

```
$if($eql(%genre%,XXX),%genre%,)

```

If genre equals XXX then return genre else do nothing.

---

<div class="post-metadata">

### Author: ![astrohip](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astrohip/32/18205_2.png) [@astrohip](https://community.mp3tag.de/u/astrohip)
#### Post date: [June 27, 2006, 11:29am UTC](https://community.mp3tag.de/t/export-by-genre/3497/3 "2006-06-27T11:29:55Z")

</div>

Thanks. Do I put that directly before the LOOP statement? Does it need any closing line, or just that?

I would try it now, but I am at work, and my Mp3Tag is at home . . . 🕶

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [June 27, 2006, 11:58am UTC](https://community.mp3tag.de/t/export-by-genre/3497/4 "2006-06-27T11:58:09Z")

</div>

> [@astrohip](#):
>
> Thanks. Do I put that directly before the LOOP statement? Does it need any closing line, or just that?  
> I would try it now, but I am at work, and my Mp3Tag is at home . . . 🕶

It doesn't need any closing line.  
You can:

- replace directly with "%genre%" anywhere in code

- put it inside the loop  
example (simple table):

---

<div class="post-metadata">

### Author: ![astrohip](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astrohip/32/18205_2.png) [@astrohip](https://community.mp3tag.de/u/astrohip)
#### Post date: [June 27, 2006, 9:54pm UTC](https://community.mp3tag.de/t/export-by-genre/3497/5 "2006-06-27T21:54:08Z")

</div>

Got it working, THANKS!

---

<div class="post-metadata">

### Author: ![astrohip](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astrohip/32/18205_2.png) [@astrohip](https://community.mp3tag.de/u/astrohip)
#### Post date: [June 27, 2006, 10:55pm UTC](https://community.mp3tag.de/t/export-by-genre/3497/6 "2006-06-27T22:55:19Z")

</div>

Question Part II ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

How do I make the **IF** have a multiple choice. In other words, if the GENRE is XX or YY, then...

Thanks! ![:book:](https://community.mp3tag.de/uploads/default/original/1X/0036d5b68f6226c53f6c68abfd0a7b8096fd4505.gif ":book:")

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [June 28, 2006, 7:10am UTC](https://community.mp3tag.de/t/export-by-genre/3497/7 "2006-06-28T07:10:14Z")

</div>

Mp3tag have great [help](https://docs.mp3tag.de).  
Why don't you read & play with [scripting functions](https://docs.mp3tag.de/scripting) it's fun. 🙂

> [@](#):
>
> How do I make the IF have a multiple choice. In other words, if the GENRE is XX or YY, then...

$if($or($eql(%genre%,XX),$eql(%genre%,YY)),%genre%,)

If genre is XX or YY then return genre else do nothing.

---

<div class="post-metadata">

### Author: ![astrohip](https://community.mp3tag.de/user_avatar/community.mp3tag.de/astrohip/32/18205_2.png) [@astrohip](https://community.mp3tag.de/u/astrohip)
#### Post date: [June 28, 2006, 1:31pm UTC](https://community.mp3tag.de/t/export-by-genre/3497/8 "2006-06-28T13:31:17Z")

</div>

> [@milka](#):
>
> Mp3tag have great [help](https://docs.mp3tag.de).  
> Why don't you read & play with [scripting functions](https://docs.mp3tag.de/scripting) it's fun. 🙂

Thanks for the help. I actually started reading the scripting functions last night, and found a whole new world of fun! ![:ph34r:](https://community.mp3tag.de/uploads/default/original/1X/d9d21e0e122fbe04cbaaa509828a996924771538.gif ":ph34r:")

Many thanks!!
