# Error "if" in (tag - filename)

**URL:** <https://community.mp3tag.de/t/error-if-in-tag-filename/62030>\
**Category:** Support\
**Created:** [September 2, 2023, 7:04pm UTC](https://community.mp3tag.de/t/error-if-in-tag-filename/62030 "2023-09-02T19:04:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![turboman](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df788c/32.png) [@turboman](https://community.mp3tag.de/u/turboman)\
**Post date:** [September 2, 2023, 7:04pm UTC](https://community.mp3tag.de/t/error-if-in-tag-filename/62030/1 "2023-09-02T19:04:40Z")

</div>

"$if(%artist%=="Various",%title%,%title% - %artist%)" in (tag - filename) does not work.

---

<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:** [September 2, 2023, 7:09pm UTC](https://community.mp3tag.de/t/error-if-in-tag-filename/62030/2 "2023-09-02T19:09:25Z")

</div>

For which program should this syntax work?

See the documentation for the scripting functions in MP3tag:

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [September 2, 2023, 7:10pm UTC](https://community.mp3tag.de/t/error-if-in-tag-filename/62030/3 "2023-09-02T19:10:47Z")

</div>

> [@turboman](#):
>
> $if(%artist%=="Various",%title%,%title% - %artist%)

You would have to use a syntax like this:  
`$if($eql(%artist%,Various),%title%,%title% - %artist%)`

Your `==` and enclosing a value in double quotes is not a valid syntax for Mp3tag.  
Where did you find this example?

---

<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:** [October 2, 2023, 7:11pm UTC](https://community.mp3tag.de/t/error-if-in-tag-filename/62030/4 "2023-10-02T19:11:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
