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

Does Windows File Explorer arrange files in the wrong numerical way? Fix it with this guide.


File Explorer has two methods for sorting files according to their numerical nomenclature: numerical sort and literal sort. With numeric sorting, file names are sorted in ascending numerical order (e.g. 2 < 3 < 22 < 33). In contrast, literal sort sorts files based on each number in their name (e.g. 2 < 222 < 3 < 356).


In this article, we will show how to enable or disable numerical sorting in File Explorer.


How to enable or disable numeric sorting using Registry Editor

You can quickly enable or disable numeric sorting by doing a simple Windows registry tweak on your system. However, you must always create a registry backup before applying any changes. For more information, see our guide to backing up the Windows registry.

To enable numeric sorting using Registry Editor, follow these steps:

  1. open that start menu by pressing the Win Key.
  2. Type in the search bar regedit and choose Execute as administrator from the right pane.
  3. click Yes to the UAC that pops up.
  4. Click on the address bar, paste the following location and press Enter.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
  5. Right-click the Explorer folder in the left pane and select Newand then select DWORD value (32 bits). from the context menu.
  6. Name the value NoStrCmpLogical and press Enter.
  7. Right-click NoStrCmpLogical and select Change.
  8. Make sure, that base value is set Hexadecimal.
  9. Type 0 in reading and click OK to enable numeric sorting.
  10. To turn off numeric sorting, type 1 in Value data and click OK.

Reboot your system for the changes to take effect.

How to enable or disable numeric sorting using Local Group Policy Editor

Another way to manage numerical sorting is to tweak the Group Policy Editor. However, this editor is not available by default on Windows Home, but there is a workaround that you can use to enable the Group Policy Editor in Windows Home. So make sure you do this before proceeding.

To enable or disable numeric sorting using Group Policy Editor:

  1. Launch the Run dialog box by pressing victory + R hot keys.
  2. Type in the search box gpedit.msc and press Enter. The Group Policy Editor will start.
  3. Navigate to the following location:
    Computer Configuration > Administrative Templates > Windows Components > File Explorer
  4. In the left pane, click the File Explorer folder and then right-click Disable numeric sorting in File Explorer.
  5. To enable numeric sorting, select it Disabled option and then click OK.
  6. To turn off numeric sorting, select it Allowed option and then click OK.

Enable or disable numeric sorting at any time

Whatever your preference, you now know how to make File Explorer sort numbered files the way you want them to. This trick is just one of many ways to speed up your file management skills on Windows.

Leave a Reply

Your email address will not be published. Required fields are marked *