locked
Alphabetic sorting issue RRS feed

  • Question

  • I'm testing windows 7 pro on my station to see if we are going to switch over from XP. So far I like almost everything except for a couple of items which are driving me up the wall.

    1) Alphabetical sorting - when I sort by name the files are not sorted correctly. For instance; I have a series that is sorted as:
    CBP IT open answers.pdf
    CBP IT open.pdf
    CBP IT resume.pdf
    Orlando open answers.pdf
    Orlando open confirm.pdf
    Orlando open.pdf

    Windows WILL NOT sort them properly. In a proper alphabetical sorting whatever open.pdf should be the first in the series.

    The other problem I have is with that (lot's of realy bad words that can't be said in mixed company) automatic sorting everytime a filename is changed or a new file created. It is absurd that this "feature" can not be disabled.

    Is there any way to take care of theses two issues or does anyone know if MS plans on providing a solution? Otherwise we are going to keep using XP.

    Bill
    Wednesday, October 7, 2009 5:43 PM

Answers

  • Hi Bill,

     

    This is caused that all characters are using ASCII. Thus a "space" is the first prior character than all others including the ".". So "a a.a" will be put in from of the "a.a".

     

    As a workaround, I suggest that let's replace all the "space" symbols in file names with a "_". (as you mentioned in first reply).

     

    "_" is a character which has a low ASCII order than ".", so it will not affect the order.

    Here is a ACSII table. Please see ASCII printable characters sentence.
    Friday, October 9, 2009 3:24 AM

All replies

  • At least I found a partial sloution to #1. If I go back to DOS naming conventions and replace blank spaces with underscores, then it sorts properly. MS seems to be rushing head on into 20 years ago. So much for progress.
    Wednesday, October 7, 2009 5:48 PM
  • Take a look here, see if it works. It used to work in XP but stopped around SP2 or SP3 timeframe, at least for me.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;319827


    Edit: I just tried it and son of a gun, it works. I created the folders shown below and they showed like this:

    Ie4_01
    Ie4_128
    Ie5
    Ie6
    Ie401sp2
    Ie501sp2

    I then added the registry key as the article mentioned (had to add the Explorer key as well) and now it sorts like this:

    Ie4_01
    Ie4_128
    Ie401sp2
    Ie5
    Ie501sp2
    Ie6

    Thursday, October 8, 2009 1:15 AM
  • Thanks for the suggestions, but I've already done that. It works for numbers. Try it with letters and blank spaces.
    how it should sort:
    a.txt
    a a.txt
    a b.txt
    a b c.txt
    a c.txt
    aa.txt
    ab.txt
    abc.txt
    ac.txt     "a" with nothing after should be first, followed by all of the "aBLANKa"s, then all of the "aBLANKb"s, etc; after all of the "aBLANK"s are exhausted it    moves on to "aa" and repeats the process.
     
    How it does sort:
    a a.txt
    a b c.txt
    a b.txt
    a c.txt
    a.txt
    aa.txt
    ab.txt
    abc.txt
    ac.txt     apparentaly it is designed to start a new series after each blank space and completely screws up any logical order.

    For the past several versions Windows has treated a blank space as the "1st" letter of the alphabet and you could even start a filename with a blank if you wanted to (or weren't careful), Windows 7 won't let you start a name with a space and screwed up sorting for any filename series that contains spaces.

    This and fact that there is no way to disable that *&$%@@#%&*&^%$!#$ automatic sorting "feature" means that I will keep my municipality on XP.
    Bill
    Thursday, October 8, 2009 1:53 PM
  • Well that's annoying! I thought I had it, rats. Sorry about that.

    Edit:
    Hmmm, just tried your name test under XP Pro + SP3 + updates, and I get this, with and without making the registry change, so even XP doesn't get it exactly right.

    a a.txt
    a b c.txt
    a b.txt
    a c.txt
    a.txt     <------ s/b first but it's not
    aa.txt
    ab.txt
    abc.txt
    ac.txt
    Thursday, October 8, 2009 2:15 PM
  • Hi Bill,

     

    This is caused that all characters are using ASCII. Thus a "space" is the first prior character than all others including the ".". So "a a.a" will be put in from of the "a.a".

     

    As a workaround, I suggest that let's replace all the "space" symbols in file names with a "_". (as you mentioned in first reply).

     

    "_" is a character which has a low ASCII order than ".", so it will not affect the order.

    Here is a ACSII table. Please see ASCII printable characters sentence.
    Friday, October 9, 2009 3:24 AM
  • That's all well and good, but what ever happened to "Natural Sort Order" as was implemented in Windows 2000 and previous OSes?

    Sounds like MS has taken the easy way out on this one, when what many people really want is to see things sorted as a person would sort them (Natural Sort Order), not as a computer would sort them.

    It would be abit slower, I'm sure, but with modern systems, who cares?
    Thursday, October 15, 2009 10:48 PM
  • You are absolutely correct, it looks like the MS writers were taking a shortcut. I ahouldn't have to go through my computer and fill in every " " in every filename with a "_" just to get a proper sort order.
    Friday, October 16, 2009 3:47 PM
  • What does 'low ASCII order' mean?  is it the numerical value?
    My problem is that undescores are now sorting above numbers.  However hyphens do not.  So I have begun replacing underscores with hyphens...is it becuase hyphens (#90) are even lower than underscores (#95)?
    If it is numerically based, wouldn't it seem that underscores would sort after caps and before lowercase? 
    Tuesday, January 26, 2010 8:34 PM
  • Something strange goes on with the dash (ascii 45) character, too.  Filename "1.txt" sorts before "-1.txt" even though that puts ascii 49 before ascii 45.

    Monday, June 20, 2011 2:03 PM