Tree on FAT32 does not sort by name by default.

May 20, 2009
293
5
57
ITALY
I found that on a FAT32 disk the tree command does not sort by name by default.
Instead, it seems that it sorts by time-stamp.
I have not been able to reproduce this issue on NTFS nor on network drive.


Regards

Rodolfo Giovanninetti

2291
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,497
91
Albuquerque, NM
prospero.unm.edu
AFAIK, TREE does not sort at all by default. It just lists directory entries in the order they appear on the disk. The behavior you're seeing is just the way that the underlying file system works.

On NTFS, the filesystem itself sorts directory entries by name, though not necessarily in the same order that DIR would.

On FAT, it's essentially random. Older items will tend appear first, but that isn't guaranteed. Deleting an older file can open up a slot that may be reused by a newer file.
 
May 20, 2009
293
5
57
ITALY
Thank You for the help.
Right now I have not access to that system, but I put here a part of the on-line help, that says the same thing.
It says, regarding the /O option, that by default the tree command sorts by name.
So, maybe it is an issue of the documentation, not of the software.

Thank You again and regards

Rodolfo Giovanninetti

2292
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,497
91
Albuquerque, NM
prospero.unm.edu
I interpret that as meaning that /O by itself — without any sort keys specified — sorts by name. Not that TREE without /O sorts by default.

But I could always be mistaken.
 
May 20, 2009
293
5
57
ITALY
I too thought about this, but "*tree /O:" is the same, it does not sort according to name.

Regards

Rodolfo Giovanninetti
 
Similar threads
Thread starter Title Forum Replies Date
rps TREE /w Alt-F2 Support 1
CWBillow Copy a tree Support 17
D Fixed Minor problem: output not alligned in the tree command Support 1
C Suggestions for Compare Folder Tree routine Support 5
M How to? Find out the total allocated size of a directory tree... Support 7
M How to? File and dirctory counts in a tree... Support 2
fpefpe How to? Rename runs tree Support 10
Frank mirror directory tree and preserve directory timestamp Support 3
CWBillow Sync Folder Tree and Command Window? Support 11
J directory tree - move or copy Support 3
D Copy directory tree without repeating directory name Support 32
MBaas GUI-Tool for "File/Open" or tree (for use in batch-files) Support 3
T Fixed Function @timer[] does not work as required Support 6
D Parsing an array variable to an array does not work Support 5
J Take command does not start on Windows 10 Support 3
J ffind does not find files Support 4
Joe Caverly PAUSE does not erase countdown timer Support 0
D ParentDirectory does not update directory history Support 6
D Documentation Help "Startup" page does not describe global lists Support 0
Charles Dye Does HASH's /E option do anything? Support 1
fishman@panix.com First TCC instantiation after reboot does not work. Support 17
D Fixed @VERSION does not increment pre-fixed version numbers. Support 1
vefatica Why does @WSLPATH double the leading '/'? Support 7
D What does the file "..\Everything\Run history.csv" store? Support 5
Peter Murschall WAD rem does not work correctly Support 8
vefatica Does @SYMLINK work? Support 6
A Tcc does not recognize "bcdedit" Support 20
MickeyF Why does this batch file give me 'unknown command "else"' error? Support 17
M Ctrl-C when using command line history does nothing Support 2
vefatica JOBS /K ... how does it work? Support 5
Joe Caverly Why does TCCRT return VIEW as an internal command? Support 6
D Does TCC improve CMD's implementation of ECHO? Support 6
vefatica Find Files/Text dialog: does it work? Support 0
Alpengreis [v22.00.41] sync command flag "/X" does not work Support 22
Joe Caverly .PS1 script does not work with PSHELL Support 11
M MOVE does not behaves like intended (on failure) Support 1
R Fixed Sendmail parameter /USER= does not work Support 4
twaterloo does tcc have a task sceduler Support 4
Brian Woodward How to? Does FTP.CFG only support SSL over port 21? (Newbie) Support 6
M Activation Key does not correspond… Support 2
James Miller tcc shell window does not disappear Support 18
D Lua does not work on the commandline Support 5
D Fresh instance of TCMD does not use TCMD.INI Support 7
D Fixed @Lua does not behave as documented Support 8
D everything /o does not open the option dialog Support 4
M Why does HELP keep opening in the background? Support 0
vefatica Does TCC know I'm visiting the forums? Support 76
vefatica Why does my forum theme keep changing? Support 1
fishman@panix.com 19.02.37 Does Not Install For Me Support 2
I Windows 10 console does not allow alt-F4 alias to complete Support 1

Similar threads