# Newbie wants basic scripting help

**URL:** https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926
**Category:** Support
**Created:** [October 19, 2006, 12:08pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926 "2006-10-19T12:08:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![miles\_muso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@miles\_muso](https://community.mp3tag.de/u/miles_muso)
#### Post date: [October 19, 2006, 12:08pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/1 "2006-10-19T12:08:13Z")

</div>

Hi All,

I've just got into the scripting side of Mp3tag, and I currently use the following

F:\My Music\Artist\Artist - 'Album' - tracknn - title

for which I am using the following format string:

F:\My Music\%artist%\%artist% -  
$iflonger(%album%,1,$char(39)%album%$char(39),$char(39)No  
Album$char(39)) - $ifgreater(%track%,-1,track$num(%track%,2),00) -  
$iflonger(%title%,1,$caps($validate(%title%,\_)),track%track%)

the $ifgreater is to check for the absence of a track number, and the  
$iflongers are to check for the absence of a track name or an album name.

Reading the forum, I can see that the scripting language has more features than mentioned in Florian's basic help examples.

Is there a website that lists ALL the syntax for the scripting functions?

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [October 19, 2006, 12:40pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/2 "2006-10-19T12:40:03Z")

</div>

Instead of your $iflonger() construct, you can use the $if2() function: $if2(''%artist%'',''No Artist''). If an artist field is set, my example returns 'Artist', otherwise it returns 'No Artist'. In the code you have to use the apostrophe twice in order for Mp3tag to see it as literal apostrophe.

[https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting) contains most scripting functions, but not all (if2() is not listed there probably because Florian didn't have the time to update the help file).

---

<div class="post-metadata">

### Author: ![miles\_muso](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@miles\_muso](https://community.mp3tag.de/u/miles_muso)
#### Post date: [October 21, 2006, 7:54pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/3 "2006-10-21T19:54:50Z")

</div>

> [@Sebastian Mares](#):
>
> if2() is not listed there probably because Florian didn't have the time to update the help file.

Thanks for the response Sebastian, and I will utilise the if2() construct. But if this wasn't in the helpfile, then how did you know about it?!?

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [October 21, 2006, 8:10pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/4 "2006-10-21T20:10:29Z")

</div>

Mp3tag supports a lot of foobar2000's scripting functions. 🙂

[http://wiki.hydrogenaudio.org/index.php?ti...ce#Control\_flow](http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#Control_flow)

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 4, 2006, 7:46pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/5 "2006-11-04T19:46:02Z")

</div>

I've added it to the help file. Thanks for pointing.

Best regards,  
Florian

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [November 4, 2006, 8:08pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/6 "2006-11-04T20:08:27Z")

</div>

While at it, could you also update the online help, Florian? The actions page for example doesn't list the new album cover related action types. 🙂

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 4, 2006, 8:22pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/7 "2006-11-04T20:22:21Z")

</div>

Done! 🙂

---

<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:19pm UTC](https://community.mp3tag.de/t/newbie-wants-basic-scripting-help/3926/8 "2026-02-09T12:19:57Z")

</div>


