General Enable or Disable Numerical Sorting in File Explorer in Windows 11


  • Staff
Numerical_Sorting_banner.png

This tutorial will show you how to enable or disable numerical sorting in File Explorer for all users in Windows 10 and Windows 11.

File Explorer sorts file names in numerical order and not literally by default in Windows 10 and Windows 11.

When numerical sorting is enabled, File Explorer will sort file names by increasing number value (for example, 3 < 22 < 111).

When numerical sorting is disabled, File Explorer will sort file names by each digit in a file name (for example, 111 < 22 < 3).


You must be signed in as an administrator to enable or disable numerical sorting in File Explorer.



Contents

  • Option One: Enable or Disable Numerical Sorting in File Explorer in Local Group Policy Editor
  • Option Two: Enable or Disable Numerical Sorting in File Explorer using REG file


EXAMPLE: Numerical sorting in File Explorer enabled and disabled

numerical_sorting_enabled.png
numerical_sorting_disabled.png





Option One

Enable or Disable Numerical Sorting in File Explorer in Local Group Policy Editor


The Local Group Policy Editor is only available in the Windows 10/11 Pro, Enterprise, and Education editions.

All editions can use Option Two to configure the same policy.


1 Open the Local Group Policy Editor (gpedit.msc).

2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)

Computer Configuration > Administrative Templates > Windows Components > File Explorer

numerical_sorting_gpedit-1.png

3 In the right pane of File Explorer in the Local Group Policy Editor, double click/tap on the Turn off numerical sorting in File Explorer policy to edit it. (see screenshot above)

4 Do step 5 (enable) or step 6 (disable) below for what you want.

5 Enable Numerical Sorting in File Explorer for All Users

This is the default setting.


A) Select (dot) Not Configured, click/tap on OK, and go to step 7. (see screenshot below)​

numerical_sorting_gpedit-2.png

6 Disable Numerical Sorting in File Explorer for All Users

This will override Option Two.


A) Select (dot) Enabled, click/tap on OK, and go to step 7. (see screenshot below)​

numerical_sorting_gpedit-3.png

7 Close the Local Group Policy Editor.

8 If File Explorer is open, then either refresh (F5) the window or close and reopen File Explorer (Win+E) to apply.




Option Two

Enable or Disable Numerical Sorting in File Explorer for All Users using REG file


1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.

2 Enable Numerical Sorting in File Explorer for All Users

This is the default setting


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Enable_numerical_sorting_in_File_Explorer.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=-

3 Disable Numerical Sorting in File Explorer for All Users

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Disable_numerical_sorting_in_File_Explorer.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=dword:00000001

4 Save the REG file to your desktop.

5 Double click/tap on the downloaded REG file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Either restart the explorer process, sign out and sign in, or restart the computer to apply.

8 You can now delete the downloaded REG file if you like.


That's it,
Shawn Brink


 

Attachments

  • Numerical_Sorting.png
    Numerical_Sorting.png
    1.1 KB · Views: 86
  • Disable_numerical_sorting_in_File_Explorer.reg
    672 bytes · Views: 216
  • Enable_numerical_sorting_in_File_Explorer.reg
    854 bytes · Views: 222
Last edited:
@Brink The HKCU setting is only in the enable reg file. It's missing from the disable reg file. For Standard users, or users that prefer to only change things in HKCU (like me), the HKCU setting is valuable.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
@Brink The HKCU setting is only in the enable reg file. It's missing from the disable reg file. For Standard users, or users that prefer to only change things in HKCU (like me), the HKCU setting is valuable.
Hello mate, :alien:

If wouldn't matter for the disable REG since HKLM would override HKCU.

HKCU is only there for the enable REG to make sure in case the "User Configuration" version of this policy was used. This tutorial only used the "Computer Configuration" version for all users.

Standard users wouldn't be able to change either policy version though.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Hello mate, :alien:

If wouldn't matter for the disable REG since HKLM would override HKCU.

Standard users wouldn't be able to change either policy version though.

Actually, HKCU settings override HKLM settings, but yes, the Standard user can't change the HKCU policy key (forgot about that).

However, I still prefer the change in HKCU, as one should not assume that all users want the same settings and I always like to keep the machine settings as close to stock as possible so that it's easy to compare behavior (i.e. a new user will have stock default settings).
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer

Latest Support Threads

Back
Top Bottom