[X] Scripting Bug in FTF Conversion?

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


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

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.
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']')

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

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

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

Thank you :w00t:


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)

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

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.

Glad that it solved your problem :slight_smile:

Best regards,
~ Florian

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