In some strange situation I seem to have a bug with listfolder().
The issued command, as taken from the STEP-view:
$listfold = listfolder("e:\daten\xyplorer\scripts", "*.xys", 5);
(I tested this, followed by " msg $listfold;" in Try Script, and it showed the same problem.)
The directory contains, besides "§§§.xys" files, some other filetypes, and (very special!) some saved versions of scripts named "§§§.xys S01" etc.
The listfolder(..., "*.xys", 5) returns all "*.xys" and also "*.xys s??"! (All other filetypes are correctly filtered.) So the result is as if the filter were "*.xys*".
(I also tested files §§§.xysS01 and §§§.xysbak - they are wrongly returned, too. But §§§.xys.bak is correctly filtered!)
Help says for pattern: If no wildcards are contained, the pattern is auto-embraced by "*" (unless flag NoAutoWildcards is set).
As "*.xys" does contain a wildcard I assumed that exactly this pattern must be matched. (I.e. "*.xys", not "*.xys*".) But finding the NoAutoWildcards-flag I also tested with flags=13 (=5+8), but it made no difference.
So it looks as if for pattern "*.xys" an asterisk is illegally added at the end.
XYplorer Beta Club