From: NadCixelsyd on
My reference book states that when reading a directory using the DIR
function, the entries are returned in no particular order. The user
should sort the records after being received. My experience is that
the directory is returned in ascending order (if all comparisons are
done in upper case). Is my version of Windows doing that or is that
pretty universal?
From: Jim Mack on
NadCixelsyd wrote:
> My reference book states that when reading a directory using the DIR
> function, the entries are returned in no particular order. The user
> should sort the records after being received. My experience is that
> the directory is returned in ascending order (if all comparisons are
> done in upper case). Is my version of Windows doing that or is that
> pretty universal?

"Returned in ascending order" is only true for one particular order.
Do you mean date & time, alphabetical, alpha-merical, size...?

What happens depends on the file system -- NTFS will differ from
FAT32, NFS, etc. When they say "no particular order" they mean, don't
count on anything. For a given file system and folder it will probably
be repeatable, but not predictable.

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"

From: Auric__ on
On Tue, 16 Feb 2010 02:00:50 GMT, NadCixelsyd wrote:

> My reference book states that when reading a directory using the DIR
> function, the entries are returned in no particular order. The user
> should sort the records after being received. My experience is that
> the directory is returned in ascending order (if all comparisons are
> done in upper case). Is my version of Windows doing that or is that
> pretty universal?

I believe that the files are returned in the order that they're listed in the
directory entry. If they're being returned in order, then they're probably
stored in order in the directory.

--
Usenet is eyeballs for chewing gum.