Share via

File explorer not sorting folders properly

Wright, Marilyn 0 Reputation points
2025-12-17T13:39:52.58+00:00

It doesn't matter how I sort it, Ascending or Descending. The folders are sorted strangely.

User's image

Windows for home | Windows 11 | Files, folders, and storage
0 comments No comments

2 answers

Sort by: Most helpful
  1. Lucus-V 8,340 Reputation points Microsoft External Staff Moderator
    2025-12-22T03:55:50.4933333+00:00

    Hi Wright, Marilyn,
    Welcome to Microsoft Q&A forum. I'm happy to help.

    The way File Explorer is sorting numbers you see in the screenshot is called "Numerical sorting", and it is enabled by default.

    To disable numerical sorting, you need to modify registry.

    Disclaimer: Generally, modifying registry subkeys or work group is intended for advanced users, administrators, and IT Professionals. It can help fix some problems, however, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For further protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click How to back up and restore the registry in Windows - Microsoft Support to view the article.

    Please follow these steps:

    1. Open Registry Editor
    2. Navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    3. Create a DWORD if not exist: NoStrCmpLogical
    4. Set its value to 1
    5. Do the same with: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
    6. Restart explorer process / sign out then sign in again / restart your computer to apply changes
    7. To re-enable numerical sorting, just delete NoStrCmpLogical DWORD

    I hope that above information is helpful to you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


  2. David-M 115.8K Reputation points Independent Advisor
    2025-12-17T14:16:59.2633333+00:00

    Hi. I'm David, and I'm happy to help you.


    Windows Explorer is sorting the folders correctly. It only uses natural sort order (sometimes called numeric‑aware sorting). That means:

    • When it sees digits in a name, it treats them as whole numbers rather than individual characters.
    • So "9FD..." is considered to start with the number 9, and "13C..." is considered to start with the number 13.
    • Since 9 < 13, "9FD..." comes before "13C..." in the list.

    It looks strange if you expect simple character‑by‑character sorting, but Explorer is actually doing the more human‑friendly numeric comparison.


    Feel free to ask back any questions.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.