Article View: borland.public.cppbuilder.nativeapi
Article #6646Re: FindFirst FindNext Problems
From: Mark Jacobs
Date: Thu, 21 Apr 2005 09:59
Date: Thu, 21 Apr 2005 09:59
19 lines
1543 bytes
1543 bytes
I tend to favour using the DOS versions findfirst and findnext, as in (*all*
.doc files in c:\temp) :-
int done;
struct ffblk ffb;
AnsiString fnm,curpth="c:\\temp\\";
done=findfirst((curpth+"*.doc").c_str(),&ffb,
FA_HIDDEN|FA_SYSTEM|FA_RDONLY|FA_ARCH);
while (!done)
{
fnm=curpth+AnsiString(ffb.ff_name);
ListBox1->Items->Add(fnm);
done=findnext(&ffb);
}
They haven't failed me in the past.
--
Mark Jacobs
http://www.dkcomputing.co.uk
Technical Details
Message-ID:
<4267799a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42675e43$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,703d67222767022e X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 21 Apr 2005 10:59:43 +0100 From: Mark Jacobs <http://www.jacobsm.com/mjmsg.htm?mj@critical> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: FindFirst FindNext Problems References: <42675e43$1@newsgroups.borland.com> In-Reply-To: <42675e43$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.144.157.8 Message-ID: <4267799a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114077594 81.144.157.8 (21 Apr 2005 02:59:54 -0800) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail