Searching for One or More Files
An application can search the current directory for all file names that match a given pattern by using the FindFirstFile, FindFirstFileEx, FindNextFile, and FindClose functions. The pattern must be a valid file name and can include wildcard characters.
The FindFirstFile and FindFirstFileEx functions create handles that FindFirstFileEx uses to search for other files with the same pattern. All functions return information about the file that was found. This information includes the file name, size, attributes, and time.
The FindFirstFileEx function also allows an application to search for files based on additional search criteria. The function can limit searches to device names or directory names.
An application can search for a single file on a specific path by using the SearchPath function.