Findfirst findnext brings back the files in the order in which they were put
onto the disk; Why wouldn’t you want to pre-load all files? Maybe if you
tell us what you are trying to achieve in the end we might be able to help
better.

 

PO Box 627 00502 Karen, 
Nairobi, Kenya.
Mobile: +254 722 996532
Fixed: +254 20 2050859
[EMAIL PROTECTED] 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of mauro russo
Sent: 15 May 2008 2:03 p
To: [email protected]
Subject: Re: [delphi-en] file counting

 

I want to avoid to pre-read all files.
In what arrangement does FindNext give files?

----- Original Message ----- 
From: Jangita 
To: [EMAIL PROTECTED] <mailto:delphi-en%40yahoogroups.com> ps.com 
Sent: Thursday, May 15, 2008 11:52 AM
Subject: RE: [delphi-en] file counting

You might want to try putting the file names retrieved a Tstrings derivative
with the sorted property set to true; then call the sort method.

You should end up with a sorted stringlist therefore sorted filenames

PO Box 627 00502 Karen, 
Nairobi, Kenya.
Mobile: +254 722 996532
Fixed: +254 20 2050859
[EMAIL PROTECTED] <mailto:jangita%40jangita.com> com 
-----Original Message-----
From: [EMAIL PROTECTED] <mailto:delphi-en%40yahoogroups.com> ps.com
[mailto:[EMAIL PROTECTED] <mailto:delphi-en%40yahoogroups.com> ps.com] On
Behalf
Of mauro russo
Sent: 15 May 2008 12:45 p
To: [EMAIL PROTECTED] <mailto:delphi-en%40yahoogroups.com> ps.com
Subject: Re: [delphi-en] file counting

Dear,

how to be sure the files are read in alphabetical arrangement?

Thanks.

----- Original Message ----- 
From: Rob Kennedy 
To: [EMAIL PROTECTED] <mailto:delphi-en%40yahoogroups.com> ps.com 
Sent: Monday, May 12, 2008 4:17 PM
Subject: Re: [delphi-en] file counting

mauro russo wrote:
> is it possible to obtain the number of files in a directory (no
sub-directories)
> without to enumerate all files, for example as FindFirst and FindNext?

No. You have to count them.

A TFileListBox would be overkill. Even if it works non-visually, it 
still needs to do all the work of enumerating the directory, and then it 
has the overhead of storing the file information that you apparently 
don't need.

When counting the files, make sure you remember to ignore the current 
and parent directories (. and ..).

-- 
Rob

----------

Questa email è stata verificata dal sistema centralizzato antivirus della
UniPlan Software

[Non-text portions of this message have been removed]

------------------------------------

-----------------------------------------------------
Home page: http://groups. <http://groups.yahoo.com/group/delphi-en/>
yahoo.com/group/delphi-en/
To unsubscribe: delphi-en-unsubscri
<mailto:delphi-en-unsubscribe%40yahoogroups.comYahoo>
[EMAIL PROTECTED] Groups Links

----------

Questa email è stata verificata dal sistema centralizzato antivirus della
UniPlan Software

[Non-text portions of this message have been removed]

 



[Non-text portions of this message have been removed]

Reply via email to