# \[X\] Scripting Bug in FTF Conversion?

**URL:** https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815
**Category:** No Bugs
**Created:** [March 27, 2005, 5:13pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815 "2005-03-27T17:13:19Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [March 27, 2005, 5:13pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/1 "2005-03-27T17:13:19Z")

</div>

The following seems to always return NULL in Filename to Filename Conversion:

```
$char($upper($left(%3,1)))
```

---

<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: [March 27, 2005, 5:46pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/2 "2005-03-27T17:46:59Z")

</div>

What does $upper($left(%3,1)) return?

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [March 27, 2005, 7:08pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/3 "2005-03-27T19:08:26Z")

</div>

> [@](#):
>
> What does $upper($left(%3,1)) return?
> 
> \<{POST\_SNAPBACK}\>

My Old Filename pattern is:

```
%1 (%2) %3 [%4{%5}] %6 ~ %7

```

Where %3 is the album artist. So if the artist is ohGr, $upper($left(%3,1)) returns O (uppercase letter O). I've tested this and it works fine. I just wanted to add another if check, so if the artist is 808 State, it would end up in a folder called #. I wanted to do it by checking the ASCII number, but it doesn't seem to return a number.  
EDIT:  
Here's the New Filename patern I was trying:  
$if($and($geql($char($upper($left(%3,1))),65),$leql($char($upper($left(%3,1))),90)),$left(%3,1),"#")\%3\%2 ~ %4\%5 ~ $if($eql(%3,%6),%7,%7 '['%6']')

---

<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: [March 27, 2005, 7:43pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/4 "2005-03-27T19:43:33Z")

</div>

$char() converts numbers (0-255) to ASCII and not characters to their ASCII-Code number.

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [March 28, 2005, 2:08am UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/5 "2005-03-28T02:08:04Z")

</div>

> [@](#):
>
> $char() converts numbers (0-255) to ASCII and not characters to their ASCII-Code number.
> 
> \<{POST\_SNAPBACK}\>

Ouch...that would explain it then. This could be another thread marked with a . Florian, do you think you could write a reciprocal function to char$()?

---

<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: [March 28, 2005, 10:07am UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/6 "2005-03-28T10:07:21Z")

</div>

> [@](#):
>
> Ouch...that would explain it then. This could be another thread marked with a . Florian, do you think you could write a reciprocal function to char$()?
> 
> \<{POST\_SNAPBACK}\>

Yes, I'll try to add a reciprocal function to the next release.

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [March 28, 2005, 12:10pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/7 "2005-03-28T12:10:09Z")

</div>

> [@](#):
>
> Yes, I'll try to add a reciprocal function to the next release.
> 
> \<{POST\_SNAPBACK}\>

Thank you ![:w00t:](https://community.mp3tag.de/uploads/default/original/1X/cb01eca72fe9339ff6f3ec9f1e3c5fe002be0f0a.gif ":w00t:")

---

<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: [March 31, 2005, 7:19am UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/8 "2005-03-31T07:19:14Z")

</div>

beaker,

is a function which tests if a character represents a decimal number of any help for you?

Example (not yet implemented): $if($isdigit($left(%artist%,1)),is a digit,is not a digit)

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [March 31, 2005, 2:53pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/9 "2005-03-31T14:53:01Z")

</div>

> [@](#):
>
> beaker,
> 
> is a function which tests if a character represents a decimal number of any help for you?
> 
> Example (not yet implemented): $if($isdigit($left(%artist%,1)),is a digit,is not a digit)
> 
> \<{POST\_SNAPBACK}\>

Yes, that would be great. 🙂 It would cut down on the filename pattern I was trying to use. Thanks, florian.

---

<div class="post-metadata">

### Author: ![beaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ecb155/32.png) [@beaker](https://community.mp3tag.de/u/beaker)
#### Post date: [April 6, 2005, 2:16am UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/10 "2005-04-06T02:16:37Z")

</div>

I just returned from vacation and got a chance to test the new version. Works great. My revised New Filename pattern is:

```
$if($isdigit($left(%3,1)),"#",$upper($left(%3,1)))\\%3\\%2 ~ %4\\%5 ~ $if($eql(%3,%6),%7,%7 '['%6']')

```

Thanks again, florian.

---

<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: [April 6, 2005, 9:33am UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/11 "2005-04-06T09:33:08Z")

</div>

> [@](#):
>
> Thanks again, florian.

Glad that it solved your problem 🙂

Best regards,  
~ Florian

---

<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: [December 28, 2018, 2:14pm UTC](https://community.mp3tag.de/t/x-scripting-bug-in-ftf-conversion/1815/12 "2018-12-28T14:14:54Z")

</div>

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