Connecting Tech Pros Worldwide Help | Site Map

FindFirstFile() limitations?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 17th, 2005, 01:22 PM
tom
Guest
 
Posts: n/a
Default FindFirstFile() limitations?

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

  #2  
Old November 17th, 2005, 01:22 PM
Sven Groot
Guest
 
Posts: n/a
Default Re: FindFirstFile() limitations?

tom wrote:[color=blue]
> 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);[/color]

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.
----

So yes, it supports wildcards, and no, it doesn't support regular
expressions.

--
Sven Groot

http://unforgiven.bloghorn.com

  #3  
Old November 17th, 2005, 01:22 PM
William DePalo [MVP VC++]
Guest
 
Posts: n/a
Default Re: FindFirstFile() limitations?

"tom" <tom_lee01@hotmail.com> wrote in message
news:u9aq39fMEHA.1348@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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);[/color]

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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.