it seems to me that *dir /O:u does not work in ntfs drives

May 20, 2009
233
1
54
ITALY
#1
I created some files and some directories, both in a FAT partition (C:) and in an NTFS partition (F:), of the same physical hard disk, with these commands:

md 1
md 3
md 2
> a.txt
> c.txt
> b.txt

Now, if I type *dir /O:u in C: FAT32 I get output unsorted, as expected.

If I type *dir /O:u in F: NTFS I get output sorted by name.

The only difference I could think of is the format of the partition.

Any hint?

I use English Windows Server 2003 R2 Enterprise S.P.2 and TCC/LE build 71.

Thank You very much

Rodolfo Giovanninetti
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,609
46
Albuquerque, NM
prospero.unm.edu
#2
Now, if I type *dir /O:u in C: FAT32 I get output unsorted, as expected.

If I type *dir /O:u in F: NTFS I get output sorted by name.

The only difference I could think of is the format of the partition.

Any hint?
NTFS directory entries are sorted on the disk, to make file searches faster.

You may, though, find some differences between the way Microsoft sorts files and the way Rex does. ISTR that TCC treats strings of digits as numeric values, not just as a sequence of characters.
 
#3
From: Rodolfo Giovanninetti
| I created some files and some directories, both in a FAT partition (C
| and in an NTFS partition (F, of the same physical hard disk, with
| these commands:
|
| md 1
| md 3
| md 2
|| a.txt
|| c.txt
|| b.txt
|
| Now, if I type *dir /O:u in C: FAT32 I get output unsorted, as
| expected.
|
| If I type *dir /O:u in F: NTFS I get output sorted by name.
|
| The only difference I could think of is the format of the partition.
|
| Any hint?
|
| I use English Windows Server 2003 R2 Enterprise S.P.2 and TCC/LE
| build 71.

IIRC on NTFS directories are sorted by the FS ("insertion sort"), so "unsorted" retrieval is equivalent to /O:ne. Cf. FAT/VFAT - each time a new entry is made, it uses the first unoccupied slot, so (before any deletions) retrieval is in order of creation. The only benefit on NTFS of using /o:u is retrieval time.
--
Steve