Windows XP (Update: all client versions of Windows share this sort order) has a very confusing way of listing files in directories. Let me give you a small explanation. How would Windows XP sort the files abc1, abc101, abc4, abc401, abc8?
No, it is not like I have ordered them in the last sentence. The default order for those files would be abc1, abc4, abc8, abc101 and abc401. The reason behind this is that Windows XP considers the numbers to be just that which means that 101 is a larger number than 4 or 8.
The logical way of sorting files would be in my opinion to see numerals in those filenames as individual characters as well. This would sort the file names in a natural way like shown above. Windows 2000 has this default sort order and it is possible to enable it in Windows XP as well.
The setting can be edited as usual in the Windows Registry. Open the Registry editor by pressing Windows and R at the same time. This opens the run box of the system.
Type regedit and tap on the enter key afterwards. You may receive an UAC prompt if you are running Windows Vista or newer versions of the Windows operating system. If you do, accept it.
Use the folder structure on the left to navigate to the following key in the Registry:
Right-click on Explorer and select New > Dword from the context menu. Name the new key NoStrCmpLogical. Double-click the key afterwards and changes its value to 1. This changes the default sort order to the Windows 2000 way. If you want to go back to the XP way of sorting files and folders in Windows explorer change it to 0 or delete the key.
Windows 2000: abc1, abc101, abc4, abc401, abc8
Windows XP: abc1, abc4, abc8, abc101, abc401
Please note that you need to restart explorer.exe, sign out and on again, or restart the computer before the changes become visible. The trick works in all recent versions of Windows.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.