ghacks Technology News

Change the Windows XP File Sort Order


Windows XP 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 text as well. This would sort the filenames 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 Registry. Press Windows R, type regedit and hit enter. Now navigate to the Registry key HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ Currentversion \ Policies \ Explorer and create a new DWORD called NoStrCmpLogical.

Set the value of the new key to 1 if you prefer the way Windows 2000 handles those filenames or to 0 if you prefer the way Windows XP does it.

Windows 2000: abc1, abc101, abc4, abc401, abc8
Windows XP: abc1, abc4, abc8, abc101, abc401




Tags:
Categories: Knowledge, Operating Systems, Windows



Related posts:

Automatically order your Windows XP Start menu alphabetically
How To Change The Edit Application In Windows
Change Order Of Windows Taskbar Items
Windows Explorer File Extension Column
Change the Print Spooler Directory

8 Responses to “Change the Windows XP File Sort Order”

  1. Benóný says:

    I’m pretty sure it’s not HKEY_LOCAL_MACHINE, but HKEY_USER\Software\Microsoft\Windows\Currentversion\Policies\Explorer

  2. Martin says:

    USER is for the single user while MACHINE is for all users

  3. Benóný says:

    ah, yes I see :)

  4. Benóný says:

    hmm.. still this isn’t working for me *-) I tried LOCAL_MACHINE ,CURRENT_USER and USER and once all at the same time and it still isn’t showing any difference *-)
    btw, my pc sorts the 2000 way, maybe I XdN Tweaker or something like that is causing this.

  5. Sanctimonious Ape says:

    I can see deleting my previous comment if I had somehow been offensive, but other than perhaps causing you some minor embarrassment I cannot see how the action was justified. My comment could have been very useful to Benóný above.

    To Benóný: Martin likes to do things “The Hard Way” (TM), and so would rather go through the registry to adjust things. Granted, it is – as he has (sort of) stated elsewhere – a good way to get to learn how the system ticks, but many of us just want to fix the problem and move on. He apparently deleted a post I made here which pointed out a much simpler way to do it, but evidently he doesn’t care for freedom of speech or alternatives being provided to “His Way” (and all that implies).

    If by some miracle he manages to get over himself enough to allow this post through, then allow me to point you to M$’ PowerToys collection, which includes the essential “TweakUI” program. TweakUI allows you to adjust the sort order by going to the “Explorer” section and toggling the “Use intuitive filename sorting” checkbox. Get TweakUI here:

    http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

  6. Martin says:

    Santimonious Ape, I accidentally deleted the second comment of you belonging in this thread. It was early in the morning and I thought it was a dupe of the comment in the other post.

    I recognized later that it belonged to this one. Sorry for that but I had no way to recover it.

    Please be careful with those accusations the next time.

  7. Benóný says:

    Thx Sanctimonious Ape ;)

Trackbacks/Pingbacks

  1. [...] priduriant skaitmenį. Na ir truputėlį erzina pripratusius prie senosios tvarkos. Gerai, kad pasak Ghacks, labai paprasta tvarką pakeisti. „Run“ eilutėje įrašykite “regedit“. Paleidę registro [...]

Leave a Reply   Subscribe To Comment Rss

© 2005-2009 Ghacks.net. All Rights Reserved. Privacy Policy - About Us