12-13-2006 09:25 PM
12-14-2006 01:34 AM - edited 12-14-2006 01:34 AM
You can use GetFirstFile ("path", 1, 0, 0, 0, 0, 0, file); and next iterate in a loop until GetNextFile (file); returns -1 (no more files). The online help for the first command explains how to delimit and perform this search.
As an example, this code finds all "temp.*" files in the application directory:
#include <utility.h>
static char path[MAX_PATHNAME_LEN];
static char file[MAX_PATHNAME_LEN];
static int r;
GetProjectDir (path);
MakePathname (path, "temp.*", path);
r = GetFirstFile (path, 1, 0, 0, 0, 0, 0, file);
if (!r) {
do {
r = GetNextFile (file);
} while (!r);
}
Message Edited by Roberto Bozzolo on 12-14-2006 08:39 AM