Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

FindFirstFile() limitations?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tom - 04 May 2004 18:44 GMT
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
Sven Groot - 04 May 2004 18:58 GMT
> Hello,
>
[quoted text clipped - 7 lines]
> 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.
----

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

Signature

Sven Groot

http://unforgiven.bloghorn.com

William DePalo [MVP VC++] - 04 May 2004 19:01 GMT
> I want to know if FindFirstFile() can do more as I expect.
>
[quoted text clipped - 5 lines]
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.