Numerical sorting in Windows File Explorer is the default method for organizing files and folder names that include numbers. Names are sorted based on the values of the numbers instead of treating the numbers as characters in a text string. In short, the numbers in file names are interpreted logically so that “File 2” comes before “File 10”.
In some instances, a user might want to turn off File Explorer numerical sorting in Windows 10 to better suit their workflows. In that case, “File 10” would come before “File 2”.
Here’s a guide to enabling and disabling numerical sorting in Windows 10.
How to enable or disable numerical file name sorting in Windows 10 using the Registry Editor
You can edit a specific Registry setting to disable numerical file name sorting on Windows 10 if you have administrator permissions. Here’s how:
- Open the Registry Editor. Press the Win + R, type regedit, and press Enter.
- Next, navigate to the following path:
- HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Policies > Explorer.
- Create or modify the DWORD value. If the Explorer key does not exist:
- Right-click Policies, select New > Key, and name it Explorer.
- In the Explorer key:
- Right-click the right side of the screen
- Proceed to New > DWORD (32-bit) Value. Name it NoStrCmpLogical.
- After this, set the value to enable or disable numerical sorting. Double-click NoStrCmpLogical and then:
- To disable numerical sorting (use alphabetical order) in File Explorer, set NoStrCmpLogical to 1.
- To enable numerical sorting (default behavior), set NoStrCmpLogical to 0 or delete it.
- Finally, restart your PC so the changes can take effect.
Troubleshooting common issues with File Explorer’s numerical sorting
Sorting doesn’t change after editing the Registry
If numerical sorting still isn’t working after following the steps above, perform the following:
- Make sure the key and value names are correct. The value must be named exactly NoStrCmpLogical. Otherwise, Windows will not recognize it.
- Double-check you’re in the correct registry location. The key must be made or modified in this path:
- HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Policies > Explorer.
- It should not be under HKEY_CURRENT_USER or elsewhere. If you need further help, check out how to find Windows Registry keys.
- Reboot your computer. Registry changes require a complete reboot to take effect.
I do not have the appropriate administrator permissions
If you do not have administrative privileges, you may be unable to create or modify registry keys under HKEY_LOCAL_MACHINE. You can run regedit as an administrator. If you can’t, secure permissions from your IT administrator.
I cannot find the Explorer key
If you cannot find the Explorer key in HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Policies > Explorer, you will need to create it yourself.
Frequently Asked Questions
What’s the default File Explorer numerical sorting in Windows 10?
By default, Windows 10 uses numerical sorting. Files and folders are sorted in natural order, meaning File 3 appears before File 11. This makes it more convenient to browse lists of numbered items.
However, using lexicographical organization makes some tasks and their workflows easier. These include sorting out timed logs, naming string sequences, and identifying position numbers.
Can I reverse this change?
Yes, this change is easily reversible. You can delete the NoStrCmpLogical value or edit it to zero.
Will this affect all users on the system?
Changing Windows numerical sorting settings in the Registry Editor applies system-wide or to all users. It is configured on HKEY_LOCAL_MACHINE, not HKEY_CURRENT_USER, which edits user-specific settings.
Does this impact search results or only file sorting?
Changing File Explorer numerical sorting in the Registry Editor will only affect how files and folders are sorted and displayed. Specifically, it controls the order in which items appear when you view a folder in any of the standard Explorer views.
I changed the setting, but it affects all folders. Can I disable it for only specific folders?
You cannot apply this change to specific folders. This Registry setting is global for all files on File Explorer. If you need pre-folder sorting, manually adjust the Sort by options via the View tab within File Explorer for each folder.
Will this impact file open and save dialogs?
Yes, it will. Many file open and save dialogs use File Explorer’s sorting logic, thus following the set sorting behavior. However, some apps may use their specific file dialogs independent of File Explorer, making them unaffected by this change.
Will this affect sorting on network and hard disk drives?
Yes, this setting affects how File Explorer sorts files and folders in the directories it displays, regardless of whether they’re on the local hard disk, an external drive, or network drives.
Improve file organization with Windows numerical sorting
Overall, numerical sorting in Windows File Explorer helps show files in a logical and easy-to-read order. It’s the default setting, which makes it simpler to organize sequences. For example, a file named “Text 4” will appear before “Text 10” instead of after it.
However, disabling numerical file name sorting on Windows 10 can benefit specific tasks and workflows. For example, you might need to name and organize your files in strict lexicographic sorting, especially if you handle patch files and vast amounts of images and their earlier versions.
You can easily control this behavior using the Registry Editor. However, be sure to run it as an administrator and that you have the appropriate permissions. Follow the steps above, double-check the registry path and value names, and restart your PC to allow the changes to take effect.