Key Points
- Windows 10 File Explorer uses numerical sorting by default, placing “File 2” before “File 10.” Disabling numerical sorting switches to lexicographical order, placing “File 10” before “File 2.”
- To disable numerical sorting, set the NoStrCmpLogical DWORD value to 1 under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Set it to 0 or delete it to restore numerical sorting.
- The Registry change applies system-wide, affecting all users rather than individual folders. Administrator permissions are required to modify this setting; restart your PC after making the change.
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 disable numerical sorting in File Explorer in Windows 10 to better suit their workflow. 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 >
- Create or modify the DWORD value. If the Explorer key does not exist:
- Right-click Policies, select New > Key, and name it
- 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 >
- 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.
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.
Quick-Start Guide
Regarding NinjaOne’s capabilities, they do provide scripting capabilities that could be used to modify this registry key. You could create a custom script in NinjaOne that uses PowerShell or a .reg file to make this registry change.

