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:


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


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.


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.


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:


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


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


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

  • 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 ( )

    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...

  • Hi,

    many thanks for the above information - very useful.

    I have a question - is it possible to sort a set of folders (default intutive file sortig) but after ignoring the first four alpha numeric characters? For example i have folders as under:

    0348.asc bio

    The default sorting would place them the way they are shown above, which I do require. However, I also have a requirement to have these sorted out after ignoring the first (in this case 4) characters, which would then sort as under:

    0351.asc bio

    many thanks!

  • VG

    ^^ There is no Registry tweak or built-in feature to do that but may be some 3rd party software allow you to do this?

  • I have a similar problem with the sorting order - I tried the regedit tip, and it did indeed work as far as NUMERICAL sorting goes.. However my problem (as I am from Denmark, and use a danish Windows version) has to do with the special characters Æ, Ø, and Å that are included in the danish alphabet.. - Explorer sort them correctly (alphabetically), but seem to also have included the letter-combination "AA" that has traditionally been used in place of Å, when using non-danish keyboards, so that files are sorted as follows:

    example z.txt
    example å.txt
    example aa.txt

    (It'll sort it that way in the cases "aa", "AA", and "Aa" - but not in the case "aA")

    Placing æ, ø, and å after z is just fine, but does anyone know if and how the "aa" letter-combination can be omitted, since I would like to be able to use alphanumerical strings as prefix to my mp3 files to set the sorting order. But of course it ought to be the same order on my android mobile as in the windows folder.. - And besides, putting "aa" after "z" is just plain silly.

  • And by the way: Similarly the dash character; "-" at the beginning of the filename is treated as "to-be-ignored", so that the file is sorted according to the next character after the dash - rather than being sorted among the special characters, alongside the underscore character.. The regedit-tip doesn't do away with that either.. Any tips for howto get rid of that too?

  • I have Windows 10. I have been fighting with that so called intelligent "Intuitive or Numerical" sort for over a year. I just found this website.
    I first created a System Restore point.
    I followed your "METHOD 2: Using Registry Editor (regedit)" instructions and then did a restart.
    The Classic Literal Sort is back and it works just the way a true sort should.

    Thank you, Rob

  • No one has addressed the file renaming route. That may allow you to negotiate the sort order mess, which has frustrated me for quite a while now. I was very glad to find this website. (The dash (hyphen) issue still bites me once in a while. Renaming files is the only cure for that that I have found.)
    Thanks for the tips!

Leave a Comment