Article View: borland.public.cppbuilder.nativeapi
Article #14687Re: Search files in special directory
From: Remy Lebeau (TeamB)
Date: Wed, 06 Aug 2003 19:14
Date: Wed, 06 Aug 2003 19:14
16 lines
1476 bytes
1476 bytes
"Paul E." <paulepst69@aol.com> wrote in message
news:3f31426f@newsgroups.borland.com...
> I need to search a folder for all existing txt files and
> load there names in a TListBox, how I can do this,
> as the folder can contain other files (than txt).
Look at FindFirstFile(), FindNextFile(), and FindClose(). Specify "*.txt"
as the file mask, ie:
WIN32_FIND_DATA fd = {0};
HANDLE hSearch = FindFirstFile( "c:\\some folder\\*.txt", &fd );
//...
Gambit
Technical Details
Message-ID:
<3f3151fe$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f31426f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e66886ded69e6589 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-06 12:11:31 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f31426f@newsgroups.borland.com> Subject: Re: Search files in special directory Date: Wed, 6 Aug 2003 12:14:00 -0700 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f3151fe$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060196862 207.175.226.26 (6 Aug 2003 12:07:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail