ok I assume that explains it, since the sort I'm using does convert to uppercase for case-insensitive compare.
On the pathnames fs filenames ... I'm not quite sure about that part. The pathnames returned by findFirst, findNext don't have a terminating \ . There is no filename. So would I split off the terminating folder name for this comparison?
MyDefrag does the comparison in two parts, for performance reasons. First it compares the directory paths (without filenames). If the paths are equal then it compares the filenames. In your example the files in the "\morpho\" folder are placed before the files in the "\morpho\ta\" subdirectory, because "\morpho\" is less (smaller) than "\morpho\ta\". To compare filenames MyDefrag uses the standard "_wcsicmp()" system call from Microsoft (with the default C locale). I don't know exactly how that function does it's magic, but I am fairly sure it's a simple binary compare with "A"-"Z" equal to "a"-"z", no other case-insensitive characters. In your example the files beginning with "_" are placed before files beginning with "t", because "_" is less than "t" in the character table. I am guessing that the program you used to sort the paths, treats "a"-"z" as equal to "A"-"Z" (the other way around), because "_" is greater than "T" in the character table.
Yes, the zero LCN files will be files that are stored in the MFT.