FindFirstFile() limitations?

T

tom

Hello,

I want to know if FindFirstFile() can do more as I expect.

FindFirstFile() can take the arguement of "*" or "?", for example,
FindFirstFile("result.*.txt", &FileData);


I want to get files result_12.txt or result10.txt only,
Could it be possible that it allows "||"?
For example,can I use the format similar as below:
FindFirstFile("result_(12||10).txt", &FileData);

Thanks,

Tom
 
S

Sven Groot

tom said:
Hello,

I want to know if FindFirstFile() can do more as I expect.

FindFirstFile() can take the arguement of "*" or "?", for example,
FindFirstFile("result.*.txt", &FileData);


I want to get files result_12.txt or result10.txt only,
Could it be possible that it allows "||"?
For example,can I use the format similar as below:
FindFirstFile("result_(12||10).txt", &FileData);

From the Platform SDK docs on FindFirstFile:
----
lpFileName
[in] Pointer to a null-terminated string that specifies a valid directory or
path and file name, which can contain wildcard characters (* and ?). If the
string ends with a wildcard, a period, or a directory name, the user must
have access to the root and all subdirectories on the path.
 
W

William DePalo [MVP VC++]

tom said:
I want to know if FindFirstFile() can do more as I expect.

FindFirstFile() can take the arguement of "*" or "?", for example,
FindFirstFile("result.*.txt", &FileData);


I want to get files result_12.txt or result10.txt only,
Could it be possible that it allows "||"?
For example,can I use the format similar as below:
FindFirstFile("result_(12||10).txt", &FileData);

Nope. Use

"result*.txt"

and filter the result set as you like. Alternatively, run the search once
against each of the different patterns.

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top