# Using if() in "tag - filename"

**URL:** https://community.mp3tag.de/t/using-if-in-tag-filename/9621
**Category:** Support
**Created:** [January 1, 2010, 10:00pm UTC](https://community.mp3tag.de/t/using-if-in-tag-filename/9621 "2010-01-01T22:00:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sweep](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@sweep](https://community.mp3tag.de/u/sweep)
#### Post date: [January 1, 2010, 10:00pm UTC](https://community.mp3tag.de/t/using-if-in-tag-filename/9621/1 "2010-01-01T22:00:23Z")

</div>

I must first of all like to say I think mp3tag is awesome - especially for helping me re-organise my music - I foolishly stored everything in directories by artist name, and obviously this is a pain when different family members want a compilation album on their player

So I have the following 2 entries in my dropdown under "tag - filename"  
F:\MyDocuments\sweep\My Music\MP3Out\Various\%album%$num(%track%,2) - %title%  
F:\MyDocuments\sweep\My Music\MP3Out\%artist%\%album%$num(%track%,2) - %title%

Now I have realised it would make my life a bit simpler (especially if I accidentally picked the wrong one) would be to use a reg expression which looks at the "Comment" tag, which I would manually set to "V" to indicate a compilation.

I'd appreciate guidance if this can be done as a single expression, please

Also is there any way of deleting entries from the "directory" dropdown

Thank you

---

<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 1, 2010, 10:10pm UTC](https://community.mp3tag.de/t/using-if-in-tag-filename/9621/2 "2010-01-01T22:10:45Z")

</div>

[https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting)

$if($eql(%comment%,V),Various,%artist%)

---

<div class="post-metadata">

### Author: ![sweep](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@sweep](https://community.mp3tag.de/u/sweep)
#### Post date: [January 2, 2010, 12:35am UTC](https://community.mp3tag.de/t/using-if-in-tag-filename/9621/3 "2010-01-02T00:35:45Z")

</div>

Cheers. I wasn't too sure if I'd need double quotes round the strings (and possibly use of concatenation characters), but I got it right first time

F:\MyDocuments\sweep\My Music\MP3Out$if($eql(%comment%,V),Various,%artist%)\%album% - %year%$num(%track%,2) - %title%

---

<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:22pm UTC](https://community.mp3tag.de/t/using-if-in-tag-filename/9621/4 "2026-02-09T12:22:03Z")

</div>


