Ok, guys. Here's a little something to make using ListFilePattern much easier: the code I'm using to process it's output. It sorts the string returned from ListFilePattern into an array and returns how many files were found:
string filelist[1000];
int ListFiles(string pattern)
{
int countpos = 0;
int numfiles = 0;
string files = ListFilePattern(pattern);
while (countpos < len(files))
{
if (!strcmp(mid(files, countpos, 1), "|"))
{
filelist[numfiles] = left(files, countpos);
files = right(files, len(files)-(countpos+1));
numfiles++;
countpos = 0;
}
else { countpos++; }
}
return numfiles;
}
I know. You all love me.