SC getpathcomponent problem
Posted: 10 Dec 2018 21:08
I'm trying this command to get the file extension, but somehow, when I use it inside a for loop via <allitems>, I get an extra right-quote in the result.
I get something like
But
[EDIT]
I just noticed that, instead of using <allitems>, if I use get("ItemsPathNames"), then getpathcomponent($item, "ext"); worked!
Code: Select all
foreach( $item, <allitems>, " " ) {
$ext = getpathcomponent($item, "ext");
echo $ext;
}
Code: Select all
MP4"getpathcomponent($item, "base");works fine.
[EDIT]
I just noticed that, instead of using <allitems>, if I use get("ItemsPathNames"), then getpathcomponent($item, "ext"); worked!