mauro russo wrote:
> Rob Kennedy wrote:
>> 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.
>
> how to be sure the files are read in alphabetical arrangement?

As the documentation for FindFirstFile says, if you want the files in a
particular order, you need to get all the names first and then put them
into the desired order yourself.

FindFirstFile and FindNextFile return files in whatever order the
filesystem driver provides them. It might be alphabetical, it might be the
order in which they were created, or it might be any other order you can
think of.

But why does the order matter? You're only counting them. You'll get the
same number no matter what order they're in.

-- 
Rob


Reply via email to