The sort order for files and folders whose names contain numerals is different in Windows Vista, Windows XP, and Windows Server 2003 than it is in Windows 2000

Article translations Article translations
Article ID: 319827 - View products that this article applies to.
This article was previously published under Q319827
Expand all | Collapse all

On This Page

SUMMARY

This article discusses the sort order that is used by Windows Vista, Windows XP, and Windows Server 2003 for files and folders whose names contain numerals. This article also contains information about how the newer sort order differs from the sort order in Windows 2000, and describes how you can modify sort order behavior in Windows Vista, Windows XP, and Windows Server 2003.

MORE INFORMATION

The sort order that is used by Windows Vista, Windows XP, and Windows Server 2003 for files and folders whose names contain numerals differs from the sort order that is used by Windows 2000. The following example shows the difference.
Windows Vista, Windows XP, and Windows Server 2003
Ie4_01
Ie4_128
Ie5
Ie6
Ie401sp2
Ie501sp2
Windows 2000
Ie4_01
Ie4_128
Ie401sp2
Ie5
Ie501sp2
Ie6
By default, the newer sort order considers strings in file and folder names as numeric content, not text. Numerals in folder and file names are sorted according to their numeric value.

In this example, 401 is a numerically higher value than 6. Therefore, the Ie401sp2 folder is listed after the Ie6 folder when you sort the folders by name in ascending order. In the following example, note how the following files, whose names contain numerals, are sorted.
Windows Vista, Windows XP, and Windows Server 2003
5.txt
11.txt
88.txt
Windows 2000
11.txt
5.txt
88.txt

To configure a policy setting to modify sort order in Windows Vista, Windows XP, or Windows Server 2003

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows


You can configure a policy setting to use either the newer sort order or the sort order that is used in Windows 2000. The policy setting is stored in the following registry entries:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer\NoStrCmpLogical


HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer\NoStrCmpLogical
To obtain this functionality in Windows XP, you must install the latest service pack for Windows XP. This functionality was first available in Windows XP Service Pack 1 (SP1). For more information about how to obtain the latest service pack for Windows XP, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to obtain the latest Windows XP service pack
After you install Windows XP Service Pack 1 or a later service pack, create the NoStrCmpLogical registry entry, and configure the policy. To do this, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Use one of the following methods, as appropriate for your situation:
    • To configure the policy for all users of the computer, locate and then click the following registry key:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer
    • To configure the policy for the current user, locate and then click the following registry key:
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer
  3. On the Edit menu, point to New, and then click DWORD Value
  4. Type NoStrCmpLogical, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. To set the sort order that you want to use for files and folders whose names contain numerals, use one of the following methods, as appropriate for your situation:
    • To configure Windows XP or Windows Server 2003 to use the method that Windows 2000 uses for sorting files and folders, in the Value data box, type 1, and the click OK.
    • To configure the default Windows XP or Windows Server 2003 method for sorting files and folders, in the Value data box, type 0, and then click OK.

      Note When the
      NoStrCmpLogical
      value does not exist or when it is set to 0 (zero), the default Windows XP sort order is used.
  7. Exit Registry Editor, and then restart the computer.

Properties

Article ID: 319827 - Last Review: August 28, 2007 - Revision: 1.9
APPLIES TO
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Ultimate
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Starter
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
Keywords: 
kbhotfixserver kbqfe kbfix kbbug kbwinxpsp1fix KB319827

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com