Re: Weird file name sorting order in folder explorer window



On Mar 31, 1:36 pm, Tom Lavedas <tglba...@xxxxxxx> wrote:
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/

Actually, I was able to get it to mess up. I changed the display from
Detail to Icon a in non-classic mode snd everything went berserk. The
only thing that I could do to restore order was to delete the folder
and recreate it in my standard for all folders - Details. Then it was
sorted correctly. It seems to be a bug in the non-classic formatted
window when any change is made. But operation in the Windows classic
mode does not create any problems. However, once it is messed up
switching into classic mode does not fix the problem. Once the order
is corrupted, it appears to be permanent. I guess it's related to a
registry setting.

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

.



Relevant Pages

  • RE: Tool Tips Hidden Behind Task Bar
    ... "Jim" wrote: ... The Tool Tips will correctly display again by mousing over items that have ... Show window contents while dragging ... Display Simple folder view in Explorer's Folders list and close the ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Weird file name sorting order in folder explorer window
    ... able to display the folder containing hundreds of these files in ... order I'd like to see them in the explorer window. ... My XPPSP2 system sorts it correctly. ...
    (microsoft.public.scripting.vbscript)
  • Re: Add context menu item for background of open folder window?
    ... a folder window, but I don't know what the list of 'everything' ... 'Open Command Window Here' context menu item would solve the whole ... for all the things that can be displayed in a folder window. ... to display folder content. ...
    (microsoft.public.scripting.vbscript)
  • Re: Add context menu item for background of open folder window?
    ... Here' item to the context menus of everything that can be displayed ... a folder window, but I don't know what the list of 'everything' ... for all the things that can be displayed in a folder window. ... to display folder content. ...
    (microsoft.public.scripting.vbscript)
  • Re: UNC
    ... Turn on display of path names in the windows file explorer. ... browse via my network places to the folder.... ... If it is just the folder shared, then you should be able to use: ... and use the debug window to display the path ...
    (microsoft.public.access.formscoding)