# \[ INVALID $IF SYNTAX \]

**URL:** <https://community.mp3tag.de/t/invalid-if-syntax/16329>\
**Category:** Support\
**Created:** [November 14, 2014, 9:47pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329 "2014-11-14T21:47:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Syni](https://community.mp3tag.de/u/Syni)\
**Post date:** [November 14, 2014, 9:47pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/1 "2014-11-14T21:47:34Z")

</div>

Hi,

I'm trying to tag my files but keep getting [INVALID $IF SYNTAX] placed onto the designated tag field.  
What I'm trying to do is have mp3tag append a custom text if a certain word is detected in a field.  
Example:

**Before**  
Artist: BIGBANG  
Album Artist:

**After**  
Artist: BIGBANG  
Album Artist: 빅뱅 (BIGBANG)

I've tried creating an action

Format Value  
**Field:** ALBUMARTIST  
**Format String:** $if($eql(%artist%,BIGBANG),빅뱅 (BIGBANG),%albumartist%)

While it works when I create it under the Action menu, I have 350+ more of these. It's a list containing the Korean Letters and English Letters combined of the Artist so it would be quite difficult to do these actions 1 by 1.

I tried editing the .mta file to manually insert the remaining Artists but it keeps showing that Invalid Syntax error in mp3tag.

Any ideas?

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [November 15, 2014, 6:12am UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/2 "2014-11-15T06:12:20Z")

</div>

> [@Syni](#):
>
> I tried editing the .mta file to manually insert the remaining Artists but it keeps showing that Invalid Syntax error in mp3tag.

I don't quite understand why ot should be easier to manually edit the mta-file instead of creating an action group, duplicate this action several times and insert the changes there.

If I have a look at the resultung mta-file it looks like this:  
[#0]  
T=5  
F=ALBUMARTIST  
1=$if($eql(%artist%,BIGBANG),\ube45\ubc45 (BIGGANG),%albumartist%)

You see the transcribed korean lettern? So in what parts and way do you change this file?

---

<div class="post-metadata">

**Author:** ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)\
**Post date:** [November 15, 2014, 8:12am UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/3 "2014-11-15T08:12:20Z")

</div>

> [@Syni](#):
>
> Format Value  
> **Field:** ALBUMARTIST  
> **Format String:** $if($eql(%artist%,BIGBANG),빅뱅 (BIGBANG),%albumartist%)
> 
> I tried editing the .mta file to manually insert the remaining Artists but it keeps showing that Invalid Syntax error in mp3tag.

I tried this $if($eql(%artist%,'BIGBANG'),'빅뱅 ('%artist%')',%albumartist%) in an .mta file and it works fine.  
Your issue is coming from your .mta file encoding. You might want to use Notepad++ for this purpose.

---

<div class="post-metadata">

**Author:** ![Syni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Syni](https://community.mp3tag.de/u/Syni)\
**Post date:** [November 15, 2014, 11:06am UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/4 "2014-11-15T11:06:06Z")

</div>

Hey guys thanks for your replies.

> [@poster](#):
>
> I don't quite understand why ot should be easier to manually edit the mta-file instead of creating an action group, duplicate this action several times and insert the changes there.
> 
> If I have a look at the resultung mta-file it looks like this:  
> [#0]  
> T=5  
> F=ALBUMARTIST  
> 1=$if($eql(%artist%,BIGBANG),\ube45\ubc45 (BIGGANG),%albumartist%)
> 
> You see the transcribed korean lettern? So in what parts and way do you change this file?

It's easier because I don't have to keep clicking duplicate and manually inserting 300+ different artists with the same coding. I can just edit and insert inside the mta file. I'm not changing it in any way other than inserting more actions in the same pattern.

This is pretty much what the mta file looks like

**[#1]**  
T=5  
F=ALBUMARTIST  
1=$if($eql(%artist%,T.O.P),\ud0d1 (T.O.P),%albumartist%)

**[#2]**  
T=5  
F=ALBUMARTIST  
1=$if($eql(%artist%,1sagain),\uc6d0\uc368\uac90 (1sagain),%albumartist%)

**[#3]**  
T=5  
F=ALBUMARTIST  
1=$if($eql(%artist%,Tarin),\ud0c0\ub9b0 (Tarin),%albumartist%)

.. all the way to **[#364]**

> [@Victor Kostas](#):
>
> I tried this $if($eql(%artist%,'BIGBANG'),'빅뱅 ('%artist%')',%albumartist%) in an .mta file and it works fine.  
> Your issue is coming from your .mta file encoding. You might want to use Notepad++ for this purpose.

That format also works for me but once I started adding more actions it starts giving me the error.  
I tried Notepad++ and no luck. I've been editing with Sublime Text. I've also tried saving in a bunch of different encodings (UTF-8, Unicode etc.) no luck either. Even when I manually add the action through mp3tag, it still converts the korean letters into those weird letters.

I have uploaded the mta file if anyone wants to check it

[Replace\_\_\_Artist.mta](https://community.mp3tag.de/uploads/default/original/2X/a/a4a4ba913577845c8468a56dfbcfa57b60b62159.mta) (39.7 KB)

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [November 15, 2014, 1:21pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/5 "2014-11-15T13:21:34Z")

</div>

> [@Syni](#):
>
> That format also works for me but once I started adding more actions it starts giving me the error.  
> I tried Notepad++ and no luck. I've been editing with Sublime Text. I've also tried saving in a bunch of different encodings (UTF-8, Unicode etc.) no luck either. Even when I manually add the action through mp3tag, it still converts the korean letters into those weird letters.
> 
> I have uploaded the mta file if anyone wants to check it

The problem is not adding more actions in the way of editing the mta-file.

The problem obviously is entry #78 with the value "Joy o'clock" as artist.  
If you delete the ' in "Joy o'clock" the syntax error is gone.

The same error happens if you use this action as a single action using the action-menue.

---

<div class="post-metadata">

**Author:** ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)\
**Post date:** [November 15, 2014, 4:30pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/6 "2014-11-15T16:30:38Z")

</div>

> [@poster](#):
>
> The problem is not adding more actions in the way of editing the mta-file.
> 
> The problem obviously is entry #78 with the value "Joy o'clock" as artist.  
> If you delete the ' in "Joy o'clock" the syntax error is gone.
> 
> The same error happens if you use this action as a single action using the action-menue.

'Joy o'clock' should become 'Joy o' **'** clock' (add a single quote ' after the inner single one).

---

<div class="post-metadata">

**Author:** ![Syni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Syni](https://community.mp3tag.de/u/Syni)\
**Post date:** [November 15, 2014, 11:03pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/7 "2014-11-15T23:03:17Z")

</div>

> [@poster](#):
>
> The problem is not adding more actions in the way of editing the mta-file.
> 
> The problem obviously is entry #78 with the value "Joy o'clock" as artist.  
> If you delete the ' in "Joy o'clock" the syntax error is gone.
> 
> The same error happens if you use this action as a single action using the action-menue.

> [@Victor Kostas](#):
>
> 'Joy o'clock' should become 'Joy o' **'** clock' (add a single quote ' after the inner single one).

Ah something that was way overlooked. You guys are so helpful. Thank you so much!

---

<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:25pm UTC](https://community.mp3tag.de/t/invalid-if-syntax/16329/8 "2026-02-09T12:25:22Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


