Why is my directory list backwards?



Hi,

This is going to seem like a weird question, but for the life of me I
can't sort it out.

Basically I am using a Directory object which then picks up
Directory.GetDirectories() to recursively pick up all the folders and
go on until I hit the bottom, at which point I pick up the files in
that folder and collectively add it all to a tree view control. The
code works fine...

Now, on my main workstation it all lists out, folders first then files,
if true alphabeticised glory. Looks just like windows explorer as you'd
expect. On my notebook though, exactly the same code and it all works,
except my folders are listed in reverse alphabetic order. I've checked
the code which seems fine and read the SDK files about
Directory.GetDirectories() which doesn't seem to offer an ordering
option by default.

So, I thought, it must be a system thing. Windows Explorer by default
seems to work fine but ou can never really tell as it remembers your
last state. DOS then may hold the key... and so it does. When I do a
"dir" from the command line - all my folders are listed back to front!
Seemingly every folder does this as well...

Does anyone now how to switch this behaviour off??

Kind regards
AndrewF

.



Relevant Pages

  • Re: Windows Explorer NoNetCrawling
    ... Mark: thanks for your information. ... Automatically search for network folders and printers ... Terminal Servers (Windows Explorer no longer uses excess CPU time) when they ...
    (microsoft.public.win2000.group_policy)
  • Re: Baffling Compacting Problem
    ... local folders created for this purpose, keeping these two default folders as ... I went into Windows Explorer to check the size of the Folders file ... compact in the background is disabled. ... I do have a habit of keeping way too many emails in the ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: disk clean up.
    ... Your telling someone who doesn't know how disc cleaner works to edit the ... > I)- Windows Explorer Parameters ... > c) Modify those folders options: ... > II)- Use chkdsk to check the integrity of your hard disk: ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: temporary Internet Files that will not delete
    ... One way in which I have been successful in deleting files ... >I go into the Internet Options or when I use Windows ... >of these annoying things like when I use Windows Explorer ... >the Fonts folder and other folders. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Windows Explorer will not remain in Details View for files
    ... firstly to 8000 and then to 16000 in both registry entries. ... number of files and folders on my machine. ... >> No matter how many times I reset the File view in Windows Explorer to ... >> apparently at random, certain directories display ...
    (microsoft.public.windowsxp.general)

Loading