INTERACT FORUM
More => Old Versions => Media Center 13 (Development Ended) => Topic started by: ProblemChild on June 27, 2009, 12:53:08 pm
-
Can someone please offer some help with an expression?
I just want an expression that returns the directory name from the path.
This:
=ListItem([Filename (path)],ListCount([Filename (path)],\),\)
returns an empty string since the function ListItem() is zero-based (ie ListCount returns the number of items
in the list, but if there are 4 items in a list, the last item is numbered 3, not 4).
Adding "-1" to the expression:
=ListItem([Filename (path)],ListCount([Filename (path)],\)-1,\)
doesn't work because =ListCount([Filename (path)],\)-1
returns the text "4-1", not the numeric value 3.
Is there a syntax here I'm missing? Thanks.
-
i think this might work:
=ListItem([Filename (path)],Math(ListCount([Filename (path)],\)-1),\)
notice the math expression. works for calculations.
;)
gab
-
That works great. Thank you.
I haven't used MC for many months. In looking up Math() I also see Pow().
Is there somewhere I can find documentation on these and other newly-added functions?
I can scan the list in the Expression Editor wizard but that's an incomplete list - it doesn't list Pow(), for instance.
Or is there a listing somewhere of each version and its changes? I know there are the many
"Media Center 13.0.XXX Available Here" pages but they only give information on a few versions.
Is there a complete listing somewhere? Even just a list of links to all the other "Media Center 13.0.XXX Available Here" pages?
I'm a huge MC fan and have been for years but this has consistently been my biggest frustration - written documentation.
In any case, thanks a lot for your help :-)
-
Or is there a listing somewhere of each version and its changes? I know there are the many
"Media Center 13.0.XXX Available Here" pages but they only give information on a few versions.
Is there a complete listing somewhere? Even just a list of links to all the other "Media Center 13.0.XXX Available Here" pages?
Alex B keeps a history. It's in his signature.
-
That's great!
Grepd "NEW" and got caught up on a LOT of things I didn't know about!
Thanks for putting that together, Alex B.