Re: Weird file name sorting order in folder explorer window




"Tom Lavedas" <tglbatch@xxxxxxx> wrote in message
news:8f7a28dc-7998-469a-a422-ed3d972b7398@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 31, 1:08 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxxxxxxxxxxxxxxxx> wrote:
I see the same behaviour in Vista. I cannot make any sense out of
it, or see
any way to fix it.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab -http://www.rlmueller.net
--

"Paul Randall" <paulr...@xxxxxxxxxxxx> wrote in message

news:u$puAa0kIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx

Hi,
I have a little project where I want the file names to be strings
of
hexidecimal numbers, like 0000.txt and A000.txt. I want the user
to be
able to display the folder containing hundreds of these files in
view-details mode, sorted alphabetically, and easily find a
particular
file. With these hexidecimally named files, the sorting is weird
and
unintuitive to me (I'd almost call the sorting dyslectic) , and
any
particular file is difficult to find.

Question: Is there any scripting (or non-scripting) way to make
a folder
explorer window display the file names in plain ASCII ascending
order?

Example:
The following script creates 61 zero-byte text files:
Option Explicit
Dim i, j, sFileName
For j = 0 To 3
For i = 0 To 15
sFileName = Right("000" & Hex(i * (16 ^ j)), 4) & ".txt"
With CreateObject("Scripting.FileSystemObject")
.CreateTextFile(sFileName, True, False).Write("")
End With
Next 'i
Next 'j
MsgBox "All Done"

This creates one file named 0000.txt and four groups of 15 files
with a
single non-zero hexidecimal digit in column 4, 3, 2, and 1
respectively,
for a total of 61 files. The order in which they are created is
the order
in which they are sorted by the 'dir /on' command, and this is
also the
order I'd like to see them in the explorer window. A folder
explorer
window sorts them differently, as follows:

0000.txt
00A0.txt
0A00.txt
000A.txt
same pattern of 3 files repeated for B, C, D, E, and F
0001.txt
0002.txt
...
0008.txt
0009.txt
same pattern of 9 files repeated with the non-zero numeric digit
in
columns 3, 2, and 1.
A000.txt
B000.txt
C000.txt
D000.txt
E000.txt
F000.txt

I'm running WXP Pro SP2, but get the same bad results on WXP Home
with no
service packs or updates installed. Adding a fixed alphabetic
character
at the beginning or end of the file name does not change the
weird sorting
order. W98SE displays the files sorted properly in an explorer
window.

Thanks for any help you can give me.

-Paul Randall

My XPPSP2 system sorts it correctly. The only thing I can think of
is
that I have it set to Windows Classic format (no web content in
folder
display).

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Tom & Richard,

Thanks for letting me know that my system isn't the problem and it is
at least possible to have WXP sort non-dyslexically. I tried manually
switching to classic folder view from control panel -> Folder Options
'Use Windows classic folders' on the general tab. That did not fix
it, but I haven't tried rebooting yet. I'd prefer not to have to
reboot to get the proper sort, and be able to easily get back the
person's preferences. I will play with it some more....

I've been messing with Unicode a little, and now I understand why the
order of the files listed at http://unicode.org/charts/PDF/?C=N;O=A
seems strange.

-Paul Randall


.



Relevant Pages

  • Re: Weird file name sorting order in folder explorer window
    ... explorer window display the file names in plain ASCII ascending order? ... A folder explorer ...
    (microsoft.public.scripting.vbscript)
  • Re: Weird file name sorting order in folder explorer window
    ... "Paul Randall" wrote in message ... Is there any scripting way to make a> folder ... > explorer window display the file names in plain ASCII ascending order? ...
    (microsoft.public.scripting.vbscript)
  • Re: Display Folder Question
    ... Close the left pane, then go to Tools, Folder Options, View and click Apply to All Folders. ... Close to close the Explorer window. ... >I am hoping someone can help to resolve this problem. ...
    (microsoft.public.windowsxp.basics)
  • Re: How do I rename WINDOWS directory to Windows
    ... >>renaming this folder. ... >Well then try in an Explorer window, right click and Rename. ... >window (say after a reboot to a menu and using Safe Mode, ...
    (microsoft.public.windowsxp.general)
  • Re: Image Viewing Software for CDs
    ... Download the file Slideshow.exe in one of your folder, ... this window to copy to a CD-R. ... Check if your drive is set for recording. ... but you can't find a Recording tab when the window opens. ...
    (microsoft.public.windowsxp.photos)