rogerfg7
asked on
Explorer not sorting correctly
Windows 7 Explorer is not sorting files correctly. I have sorted them by Name ascending and also done a DIR command, Sort order is different. Any ideas?
FileSort.png
FileSort.png
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, it won't put March before December.
ASKER
What I need to do now is modify my VS 2005 code in my application to sort them in the same order as Windows
I am using
file1.FilePath.CompareTo(f ile2.FileP ath) in the IComparer Compare method.
Are there any inbuilt compare routines that act the same as Windows sort or do I write my own?
I guess this might be another post as it is now extending the topic.
I am using
file1.FilePath.CompareTo(f
Are there any inbuilt compare routines that act the same as Windows sort or do I write my own?
I guess this might be another post as it is now extending the topic.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just done an Internet search on this very topic and it seems the answer is 'write your own'.
Many thanks guys. It's always the obvious that you miss!!
Many thanks guys. It's always the obvious that you miss!!
Why write your own???
StrCmpLogicalW is used by Windows Explorer to sort files. You can't get closer than that :)
StrCmpLogicalW is used by Windows Explorer to sort files. You can't get closer than that :)
ASKER
There seems to be no equivalent available in .Net managed code
stackoverflow.com/question s/8793856/ net-equiva lent-of-st rcmplogica lw
stackoverflow.com/question
ASKER
But I want it to sort alphabetically (as per DOS) not numerically. MS too clever sometimes.
Does it also sort Month names in chronological order?