homepage Welcome to WebmasterWorld Guest from 54.166.148.189
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Deprecated - Microsoft Windows OS (XP/NT/Vista)
Forum Library, Charter, Moderators: bill

Deprecated - Microsoft Windows OS (XP/NT/Vista) Forum

    
Need a different sort order in Vista
Is it possible to change Vista's alphabetization rules?
jdkuehne




msg:3767138
 3:13 pm on Oct 16, 2008 (gmt 0)

I have a directory with many sub-directories, a large number of which names that start with numbers. In Windows XP and earlier, the alphabetized list would look something like this:

123456aaa
52bbb
8674ccc

In Vista it now looks like this:

52bbb
8674ccc
123456aaa

The sort rules have changed in such a way that the same length numerical strings are all grouped together. This makes it tedious to search through a directory listing looking for a specific folder.

Has anyone found a way to change this behavior back to the old style? Thanks.

 

bill




msg:3767586
 4:21 am on Oct 17, 2008 (gmt 0)

If you click the Name field at the top of a column in Windows Explorer that will toggle the sort order. It will sort alphabetically either ascending or descending order. This works for the other columns you choose to display as well.

kaled




msg:3767772
 10:48 am on Oct 17, 2008 (gmt 0)

Take a look at this...

[support.microsoft.com...]

Kaled.

jdkuehne




msg:3767880
 1:26 pm on Oct 17, 2008 (gmt 0)

Thank you kaled - That was exactly what I was looking for!

Robert Charlton




msg:3768217
 7:20 pm on Oct 17, 2008 (gmt 0)

kaled - Great reference. Thanks.

To take this question a bit further, does anyone know what the sort order rules are for Macs?

I occasionally encounter cross-platform issues when working with clients and suppliers who work on Macs, and it would be nice to know of potential sort order inconsistencies in advance. This seems a good place to ask.

Robert Charlton




msg:3768223
 7:32 pm on Oct 17, 2008 (gmt 0)

A PS to comments above...

I just noticed that the MS KB article suggests that XP and Vista should behave the same. The OP's question (and example) suggests that they don't.

The sort order that is used by Windows Vista, Windows XP, and Windows Server 2003 for files and folders whose names contain numerals differs from the sort order that is used by Windows 2000....

...By default, the newer sort order considers strings in file and folder names as numeric content, not text. Numerals in folder and file names are sorted according to their numeric value.


travelin cat




msg:3768233
 7:44 pm on Oct 17, 2008 (gmt 0)

In Mac OSX, I get the following:

Alphabetically:
52bbb
8674ccc
123456aaa

Reverse Alpha:
123456aaa
8674ccc
52bbb

When I add a letter to the beginning, I get:

Alphabetically:
a52bbb
b123456aaa
c8674ccc

Reverse Alpha:
c8674ccc
b123456aaa
a52bbb

jdkuehne




msg:3768234
 7:47 pm on Oct 17, 2008 (gmt 0)

Hi Robert Charlton - that was my error when I typed the original question. I was using Win2000 at work before upgrading to Vista, but at home I am on XP. Just force of habit to reference XP I guess.

Robert Charlton




msg:3768329
 10:20 pm on Oct 17, 2008 (gmt 0)

Thanks... So, what we have is that... when the filename begines with a number... XP, Vista, and Mac OSX are consistent with each other, and that they sort as MS describes in KB-319827, which kaled linked to above....

By default, the newer sort order considers strings in file and folder names as numeric content, not text. Numerals in folder and file names are sorted according to their numeric value.

None of the examples quite covered all possibilities, including what happens in various apps, so I've run the following tests on XP, with some text .txt files. XP (which is to say, Windows Explorer) maintains the numerical values of numbers even when preceded by an alphabetical character). Some second party apps on XP change this order, treating numbers as alphabetical characers....

IN WINDOWS EXPLORER ON XP

85aa.txt
789aa.txt
12345aa.txt
abc.txt
cdf.txt
d85aa.txt
ghi.txt
x85aa.txt
x789aa.txt
x12345aa.txt

IN SECOND-PARTY FILE MANAGER (TOTAL COMMANDER) ON XP

12345aa.txt
789aa.txt
85aa.txt
abc.txt
cdf.txt
d85aa.txt
ghi.txt
x12345aa.txt
x789aa.txt
x85aa.txt

ALPHANUMERIC SORT IN TEXT EDITOR (NOTETAB PRO)

12345aa.txt
789aa.txt
85aa.txt
abc.txt
cdf.txt
d85aa.txt
ghi.txt
x12345aa.txt
x789aa.txt
x85aa.txt

travelin cat




msg:3768337
 10:36 pm on Oct 17, 2008 (gmt 0)

On my Mac, when I label them all starting with the same letter, but with different numerals, I get this:

Alphabetically:

a52bbb
a8674ccc
a123456aaa
b52bbb
b8674ccc
b123456aaa

and reversed:

b123456aaa
b8674ccc
b52bbb
a123456aaa
a8674ccc
a52bbb

Pretty interesting, I've never thought about this before...

kaled




msg:3768353
 11:13 pm on Oct 17, 2008 (gmt 0)

I haven't studied this, but I think you will find that the filenames are effectively broken up into numeric strings and non-numeric strings. The numeric strings are then padded with leading zeros (to ten decimal places probably) and then recombined with the non-numeric strings. From that point onwards, normal string sorting rules will be applied.

It might be interesting to try using numerics with decimal points since no padding should be applied to the fractional part.

Kaled.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Deprecated - Microsoft Windows OS (XP/NT/Vista)
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved