This article was previously published under Q318872
SYMPTOMS
Files and folders whose name contains 10 or more consecutive digits are not sorted correctly in Windows Explorer. For example, assume that you have folders with these names:
1111111111
2222222222
3333333333
4444444444
5555555555
In Windows Explorer, these folder names are sorted as:
2222222222
3333333333
4444444444
1111111111
5555555555
CAUSE
This behavior is caused by a problem in the shell code.
RESOLUTION
To resolve this problem, obtain the latest service pack for Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to Obtain the Latest Windows XP Service Pack
The English version of this fix should have the following file attributes or later:
Date Time Version Size File name
---------------------------------------------------------
14-Mar-2002 08:32 6.0.2600.37 391,168 Shlwapi.dll
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows XP Service Pack 1.
MORE INFORMATION
If you have folders whose name contains digits, the sort order is different in Microsoft Windows 2000 and Windows XP. In Windows 2000, the following file and folder names are sorted as shown:
Ie4_01
Ie4_128
Ie401sp2
Ie5
Ie501sp2
Ie6
In Windows XP, the same files and folders are sorted as:
Ie4_01
Ie4_128
Ie5
Ie6
Ie401sp2
Ie501sp2
The sorting method is changed in Windows XP. The method that is used for sorting is described at the following MSDN Web site:
StrCmpLogicalW Function
Basically, instead of sorting character-by-character in the file name, any numeric string is handled as a number. Therefore in the Windows XP example earlier in this article, 401 is a higher number than 6, so Ie401sp2 is sorted after Ie6. 501 is higher than 401, 4, and 6, so Ie501sp2 is sorted last.
Last Reviewed: 9/5/2002
Keywords: kbbug kbshell kbWinXPsp1fix KB318872
vitiris
ASKER
hmmmm...I have XP Service Pack 1 installed though...I'll look at it again tomorrow and post a response...It has been extremely frustrating...I'll find my exact files that I'm having problems with and repost if still necessary...Thanks for all the info!
Ok, here are my findings..., but I feel that no number should sort before a filename with a number.
My exact filenames are: (Windows XP Pro - Service Pack 1)
print free leads2.bak
print free leads2.fxp
print free leads2.prg
print free leads.bak
print free leads.err
print free leads.fxp
print free leads.prg
Windows 98 would have sorted them with plain old print free leads first. why did those idiots change it? To find files, I always key the first part of the name, and it sucks to have to cursor down to get to the one without a number after it.
vitiris
ASKER
Ok, here are my findings..., but I feel that no number should sort before a filename with a number.
My exact filenames are: (Windows XP Pro - Service Pack 1)
print free leads2.bak
print free leads2.fxp
print free leads2.prg
print free leads.bak
print free leads.err
print free leads.fxp
print free leads.prg
Windows 98 would have sorted them with plain old print free leads first. why did those idiots change it? To find files, I always key the first part of the name, and it sucks to have to cursor down to get to the one without a number after it.
WIN XP
abc.log
abc.txt
abc2.log
abc2.txt
abc.2lo
abc.2tx
While the first 4 files sorted a la 98, it seems to have gone the other way with the numeric-alpha extensions.
Need to test some more ...
Ted, the Modem Mixer