/
/

How to Enable or Disable File Explorer Numerical Sorting in Windows 10 

How to Enable or Disable File Explorer Numerical Sorting in Windows 10 blog banner image

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:

  1. Open the Registry Editor. Press the Win + R, type regedit, and press Enter.
  2. Next, navigate to the following path:
    • HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > CurrentVersion > Policies > Explorer. 
  3. Create or modify the DWORD value. If the Explorer key does not exist:
    • Right-click Policies, select New > Key, and name it Explorer.
  4. In the Explorer key:
    • Right-click the right side of the screen
    • Proceed to New > DWORD (32-bit) Value. Name it NoStrCmpLogical.
  5. 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.
  6. 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:

  1. Make sure the key and value names are correct. The value must be named exactly NoStrCmpLogical. Otherwise, Windows will not recognize it.
  2. 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.
  3. 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.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).