# Simple IF script doesn't seem to work

**URL:** <https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091>\
**Category:** Support\
**Created:** [May 4, 2021, 9:36pm UTC](https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091 "2021-05-04T21:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![siyer](https://community.mp3tag.de/user_avatar/community.mp3tag.de/siyer/32/9303_2.png) [@siyer](https://community.mp3tag.de/u/siyer)\
**Post date:** [May 4, 2021, 9:36pm UTC](https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091/1 "2021-05-04T21:36:00Z")

</div>

I am trying to format title field with file modified date using following IF script $if($right(%title%,1)=},%title%%\_file\_mod\_date%,%title%):

▶ i.e. if the title ends with a right brace "}" character, add file modified date to end of the title, else leave it as it is:  
▶ However it always appends the date. I tried enclosing the brace character in the test condition in single or double quotes "}" or '}' but it seems to have no effect. Looks like I don't know scripts at all.

Please help what am I doing wrong?

---

<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:** [May 5, 2021, 4:29am UTC](https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091/2 "2021-05-05T04:29:50Z")

</div>

Have a look at the help about [scripting function](https://docs.mp3tag.de/scripting/#boolean-functions)  
`$if($right(%title%,1)=},%title%%_file_mod_date%,%title%):`  
Should look like  
`$if($eql($right(%title%,1),}),%title%%_file_mod_date%,%title%):`

---

<div class="post-metadata">

**Author:** ![siyer](https://community.mp3tag.de/user_avatar/community.mp3tag.de/siyer/32/9303_2.png) [@siyer](https://community.mp3tag.de/u/siyer)\
**Post date:** [May 5, 2021, 10:10pm UTC](https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091/3 "2021-05-05T22:10:24Z")

</div>

Thank you so much Ohrenkino for your help.

---

<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:29pm UTC](https://community.mp3tag.de/t/simple-if-script-doesnt-seem-to-work/53091/4 "2026-02-09T12:29:13Z")

</div>


