How to Disable Numerical File Name Sorting and Enable Classic Literal Sorting in Windows Explorer?

If you are a Windows XP or later OS user, you might have noticed that Windows Explorer uses a different kind of sorting mechanism for file names containing numbers compared to Windows 2000 and earlier versions.

For example, if you have a folder containing files having names as 1, 246, 3, 111, 22, 33 and 2, Windows XP and later will sort them as following:

1
2
3
22
33
111
246

On the other hand, Windows 2000 and earlier versions will sort them as following:

1
111
2
22
246
3
33

Noticed the difference? Windows XP and later use an intelligent mechanism for file names sorting and show the file names having numbers in increasing number values. On the other hand, Windows 2000 and earlier versions sort file names by each number in file names.

Although Windows XP and later sorting mechanism looks better than the previous sorting mechanism but sometimes it becomes a little bit annoying when you don't want Windows to sort file names by number values, you just want Windows to sort file names by numbers so that you can get file names starting with same digit in a single place rather than showing in different places.

Actually the new Windows file name sorting mechanism is known as "Intuitive or Numerical" where file names are sorted by increasing number values. On the other hand Windows 2000 and earlier versions file name sorting is called "Literal" where file names are sorted by each digit in file name.

In this tutorial, we'll tell you a way to disable new intuitive file name sorting and enable classic literal file name sorting in Windows XP and later.

Windows_Filename_Sorting_Order_Comparison.png

So without wasting time, lets start the tutorial. We'll tell you 2 methods to do this task:

  • METHOD 1: Using Group Policy Editor
  • METHOD 2: Using Registry Editor

METHOD 1: Using Group Policy Editor (gpedit.msc)

1. Type gpedit.msc in Start Menu search box or RUN dialog box and press Enter. It'll open Group Policy Editor.

2. Now go to:

Computer Configuration -> Administrative Templates -> Windows Components -> Windows Explorer

3. In right-side pane, double-click on "Turn off numerical sorting in Windows Explorer" and set its value to Enabled.

Disable_New_Intuitive_Filename_Sorting_in_Windows_Using_GPEdit.png

4. That's it. It'll immediately disable new intuitive file name sorting and bring back classic literal file name sorting in your Windows.

PS: If you want to restore default file name sorting, simply set value of "Turn off numerical sorting in Windows Explorer" to either Not Configured or Disabled.

METHOD 2: Using Registry Editor (regedit)

Some Windows editions such as Home Basic, Home Premium and Starter don't come with Group Policy Editor. Although its possible to install Group Policy Editor in these unsupported Windows editions using this article, but if you don't want to install it or can't use Group Policy Editor, here is a Registry method given to do the same thing:

1. Type regedit in Start Menu search box or RUN dialog box and press Enter. It'll open Registry Editor.

2. Now go to following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

If you don't see "Explorer" key under Policies key, create it manually.

3. Now in right-side pane, create a new DWORD NoStrCmpLogical and set its value to 1

Disable_New_Intuitive_Filename_Sorting_in_Windows_Using_Regedit.png

4. That's it. Restart or log off and you'll get Windows 2000 style classic literal file name sorting back in Windows XP and later.

PS: If you want to restore default file name sorting, simply set value of "NoStrCmpLogical" to 0 or delete the DWORD.

NOTE: If you don't want to modify Registry manually and want a ready-made Registry script to do the task automatically, download following ZIP file, extract it and run the extracted REG file. It'll ask for confirmation, accept it:

Download Registry Script

The ZIP file also contains another registry script to restore default sorting mechanism.

Feel free to share your feedback about this trick in your comment. Did you know it before?





Share this article: Facebook | Twitter | Google+ | Reddit | Tell a friend

Posted in: Troubleshooting, Windows 7, Windows Vista, Windows XP


Other similar articles that may interest you


Comments

  • Another awesome fix! I've always hated that numerical sort but didn't know you could turn it off. Thanks!

  • Nice 1.

  • aWesome Trick ;D

  • This can also be done through TweakUI on Windows XP.

  • @ VG , I have a tip for you ! I read the whole article , and then realized there was a ready made registry script for doing so ! You should actually put the download link for the registry script at the top of the article , not at the bottom :P

  • Many thanks for that !!!
    This is helpful :-)

  • I just had to replace an old WinXP computer on which I had made the registry change to go back to the old literal sorting rule, but couldn't remember how to do that when I found this article. It was perfect and allowed me to bring back my familiar literal sorting rule on my new Dell Win7 machine. Thank you so much!

  • For Windows 8, the name changed from Windows Explorer to File Explorer, which also affects the gpedit.msc settings.

  • How about windows 10.

    would you please give some instruction to do so in windows 10 Home edition.

    Windows cannot find gpedit.msc ( content.screencast.com/users/KambizBehjati/folders/Snagit/media/3a90abe2-b373-4734-b446-a39be05a5c36/12.14.2015-15.26.png )

    also NoStrCmpLogical is not exist at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

    Thank you

  • VG

    ^^ Its already mentioned in the tutorial that gpedit.msc is not a part of Home editions. Thats why you need to create the DWORD manually in Registry Editor. If you are not familiar with Registry Editing, try the automatic Registry script given at the end of the topic.

  • In Windows 10 Pro, I was able to run gpedit.msc to open the Local Group Policy Editor. And just like Sebastian Helm noted for Windows 8, in Windows 10 the option in the registry is under "File Explorer" instead of "Windows Explorer."

    So you navigate in the Local Group Policy Editor to:
    Computer Configuration -> Administrative Templates -> Windows Components -> File Explorer -> Turn off numerical sorting in File Explorer

  • this isn't the real issue for me. I would rather see numbered files sorted in intuitive format. The issue is if I have a file A5GHT.txt and a file ABGHT.txt the later comes BEFORE the former. If I change it to literal then 5 comes before B and everything looks good EXCEPT that now 111 comes b4 2.
    So how do I win the battle and make 2 come b4 111 AND 5 come b4 B?

  • Hi. I have W10 home edition, and adding NoStrCmpLogical made no difference. Do I have to create it somewhere else? Also, when creating it, I have to choose between hexadecimal and decimal; which is it, and do I write 1 in hex/decimal, accordingly? Thanks for answering, if someone still is...

Leave a Comment

(required)