My previous subject "Explorer filename sorting problem - NoStrCmpLogical already present" has evolved into a much simpler one: How do I get XP's explorer (but the "dir" command too!) to stop ignoring the minus sign inside filenames
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.-32.32.dds
60.00.32.32.msh
60.00.-32.32.msh
60.00.32.32.nif
60.00.-32.32.nif
the reason why the above is "sorted" as it is -- with the third column showing an interleaved "33" and "-32" -- is because the minus sign is regarded as a hyphen (a word-coupling character) and ignored. The above
list than translates to:
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.32.32.dds
60.00.32.32.msh
60.00.32.32.msh
60.00.32.32.nif
60.00.32.32.nif
... which makes (some sort of) sense.
But as those "-" characters inthge first list are *NOT* hypens (but minus-signs) that second list isn't reflecting the meaning of the filenames contents. :-(
tl;dr:
How do I get XP's explorer (and "dir" command too) to stop ignoring the
minus sign inside filenames.
Or more in general: How do I stop it from treating *any* character
specially, and just sort all of them on their binary value.
Regards,
Rudy Wieser
In text strings, there is no such thing as a number,
even less so a negative number.
If you want to include some signed numbers (interpreted by parsing
text strings) then ALL numerical substrings must be signed.
With NoStrCmpLogical, there is no such thing as a
number in a text string; i.e., sorting is ASCII order
A shorter answer:
If you want to include some signed numbers (interpreted by parsing text strings) then ALL numerical substrings must be signed. You are adding
"-" to represent negative numerical values. So use "+" for all the
positive numerical strings.
VanguardLH,
In text strings, there is no such thing as a number, even less so a
negative number.
You and I know (want) that, MS is of a fully other idea. Hence the NoStrCmpLogical registry setting (to disable MS'es idea of sorting on
values embeded in filenames).
If you want to include some signed numbers (interpreted by parsing
text strings) then ALL numerical substrings must be signed.
You misunderstood: I do not want to sort on a numeric value embedded
in filenames, I just want the sorting process to stop ignoring
certain characters in filenames.
With NoStrCmpLogical, there is no such thing as a
number in a text string; i.e., sorting is ASCII order
You are the second person doing this: Ignoring the facts infront of you (the provided filename list) which shows nothing of the sort. DON'T DO THAT. Please! It feels incredibly rude.
R.Wieser wrote:(the
VanguardLH,
In text strings, there is no such thing as a number, even less so a
negative number.
You and I know (want) that, MS is of a fully other idea. Hence the NoStrCmpLogical registry setting (to disable MS'es idea of sorting on values embeded in filenames).
If you want to include some signed numbers (interpreted by parsing
text strings) then ALL numerical substrings must be signed.
You misunderstood: I do not want to sort on a numeric value embedded
in filenames, I just want the sorting process to stop ignoring
certain characters in filenames.
You said:
with the third column showing an interleaved "33" and "-32"
yet none of your examples has a "33" substring. I also did not get what
you meant by "translated" since it looked like you were trying to show
what sorting order would get used for the prior examples of filenames
(where none had "33" in them). Yet the translated list has duplicate filenames which are not allowed within a folder. No "33" examples and
not sure what the 2nd list was supposed to convey.
Was your 1st list supposed to exemplify the resultant sort order of the filenames shown by Windows Explorer? Or was the 2nd "translated" list
what you see for sort order? Which entries were supposed to contain the
"33" substring?
With NoStrCmpLogical, there is no such thing as a
number in a text string; i.e., sorting is ASCII order
You are the second person doing this: Ignoring the facts infront of you
provided filename list) which shows nothing of the sort. DON'T DO THAT. Please! It feels incredibly rude.
Who else (up to the time of this reply) has participated in THIS
discussion? I only see you and I in *this* discussion. Um, just *who*
was it that started TWO DISCONNECTED threads on the same topic? Oh
yeah, that was you.
If you start multiple disconnected discussions on the same subject,
don't expect others to aggregate them all together. With multiple
threads, expect a different set of respondents in each. If you want to
keep the discussions together then don't start separate threads. If you demand that respondents rebuild your threads into one to gather up all
the disconnected posts then I can easily step aside and let you glean a solution from those numerous respondents you have received so far.
In fact, I didn't even see your prior nearly-the-same thread. It got
flagged as Ignored by my kill filters and I use a default view that
hides Ignored-flagged threads. I hide them rather than delete them. I reviewed my kill filters to find one of them has incorrect regex looking
for political posts: it was supposed to look for "pres(ident(ial))
(elect)" but I had a wildcard in there that resulted in matching on
"present" which was in your Subject. However, even after I fix my rule,
I still won't go collating all posts made within the same day or within
the same week made by the same poster. I pick a thread and respond to
that one.
I'm not the one that chopped the discussion into separate pieces with multiple threads.
Is this 2nd list what you expected for sort order for the
filenames shown in Windows Explorer?
Perhaps you have Windows Explorer configured to sort by
filetype rather than by filename.
Did sorting work when you used ALL signed numerical values
(+ for positive values, - for negative values) instead of just adding
a hyphen to the negative numerical values?
I did not know what you were trying to represent with your "translated"
list of filenames and there were no example filenames containing "33".
Using only your 1st list of filenames, which were:
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.-32.32.dds
60.00.32.32.msh
60.00.-32.32.msh
60.00.32.32.nif
60.00.-32.32.nif
I put those into a file (input.txt) and ran it through the 'sort'
program by running at the command line:
sort input.txt /o output.txt
The sorted output looked like:
60.00.-32.32.dds
60.00.-32.32.msh
60.00.-32.32.nif
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.32.32.msh
60.00.32.32.nif
^
|__ differentiates starting here (col 7)
Is this 2nd list what you expected for sort order for the filenames
shown in Windows Explorer? This is a simple columnar sort, so at
character position #7, the output sort order is due to ASCII order of:
"-" is before "0"
"0" is is before "3"
I think you mentioned something about extension grouping in your other thread. Perhaps you have Windows Explorer configured to sort by
filetype rather than by filename. Make sure Windows Explorer is
configured to sort by Name and not by Type.
Did sorting work when you used ALL signed numerical values (+ for
positive values, - for negative values) instead of just adding a hyphen
to the negative numerical values? With the same column of values all
signed so the input looked like:
60.00.+00.32.dds
60.00.+00.32.msh
60.00.+00.32.nif
60.00.+32.32.dds
60.00.-32.32.dds
60.00.+32.32.msh
60.00.-32.32.msh
60.00.+32.32.nif
60.00.-32.32.nif
the 'sort' program produced an output list of:
60.00.-32.32.dds
60.00.-32.32.msh
60.00.-32.32.nif
60.00.+00.32.dds
60.00.+00.32.msh
60.00.+00.32.nif
60.00.+32.32.dds
60.00.+32.32.msh
60.00.+32.32.nif
This has all the negative values listed before the zero values before
the positive values (columns 7-9, inclusive)
Alas, I'm not at a Windows XP machine right now to see if Windows
Explorer will sort in the same order as the 'sort' program.
My previous subject "Explorer filename sorting problem - NoStrCmpLogical already present" has evolved into a much simpler one: How do I get XP's explorer (but the "dir" command too!) to stop ignoring the minus sign inside filenames
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.-32.32.dds
60.00.32.32.msh
60.00.-32.32.msh
60.00.32.32.nif
60.00.-32.32.nif
the reason why the above is "sorted" as it is -- with the third column showing an interleaved "33" and "-32" -- is because the minus sign is regarded as a hyphen (a word-coupling character) and ignored. The above
list than translates to:
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.32.32.dds
60.00.32.32.msh
60.00.32.32.msh
60.00.32.32.nif
60.00.32.32.nif
... which makes (some sort of) sense.
But as those "-" characters inthge first list are *NOT* hypens (but minus-signs) that second list isn't reflecting the meaning of the filenames contents. :-(
tl;dr:
How do I get XP's explorer (and "dir" command too) to stop ignoring the
minus sign inside filenames.
Or more in general: How do I stop it from treating *any* character
specially, and just sort all of them on their binary value.
Yep, Microsoft handles the hyphen a bit weird, like they ignore it.....
To get the same order using the 'dir' command, you have to add
the /on argument, as in:
They are doing something goofy regarding non-alphanumeric
characters.
R.Wieser wrote:inside
My previous subject "Explorer filename sorting problem - NoStrCmpLogical already present" has evolved into a much simpler one: How do I get XP's explorer (but the "dir" command too!) to stop ignoring the minus sign
filenamesfilenames
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.-32.32.dds
60.00.32.32.msh
60.00.-32.32.msh
60.00.32.32.nif
60.00.-32.32.nif
the reason why the above is "sorted" as it is -- with the third column showing an interleaved "33" and "-32" -- is because the minus sign is regarded as a hyphen (a word-coupling character) and ignored. The above list than translates to:
60.00.00.32.dds
60.00.00.32.msh
60.00.00.32.nif
60.00.32.32.dds
60.00.32.32.dds
60.00.32.32.msh
60.00.32.32.msh
60.00.32.32.nif
60.00.32.32.nif
... which makes (some sort of) sense.
But as those "-" characters inthge first list are *NOT* hypens (but minus-signs) that second list isn't reflecting the meaning of the
contents. :-(
tl;dr:
How do I get XP's explorer (and "dir" command too) to stop ignoring the minus sign inside filenames.
Or more in general: How do I stop it from treating *any* character specially, and just sort all of them on their binary value.
Had some more time to play. Yep, Microsoft handles the hyphen a bit
weird, like they ignore it. They are doing something goofy regarding non-alphanumeric characters.
What I did was to replace the hyphen with a different non-alphanumeric character, like tilde, underscore, or backquote, so the list looks like:
60.00.~32.32.nif 60.00._32.32.nif 60.00.`32.32.nif 60.00.~32.32.dds 60.00._32.32.dds 60.00.`32.32.dds 60.00.~32.32.msh 60.00._32.32.msh 60.00.`32.32.msh
60.00.00.32.dds 60.00.00.32.dds 60.00.00.32.dds
60.00.00.32.msh or 60.00.00.32.msh or 60.00.00.32.msh
60.00.00.32.nif 60.00.00.32.nif 60.00.00.32.nif
60.00.32.32.dds 60.00.32.32.dds 60.00.32.32.dds
60.00.32.32.msh 60.00.32.32.msh 60.00.32.32.msh
60.00.32.32.nif 60.00.32.32.nif 60.00.32.32.nif
To get the same order using the 'dir' command, you have to add the /on argument, as in:
dir /on
(or 'dir /o-n' if you descend sort in Windows Explorer).
How do I get Windows to drop all kinds of fancy sorting rules and
revert to (something like) ASCII order
A lot of behaviors in Windows Explorer are hard coded (well, all
of them are but I mean in that you don't get any options to remove
some of the unwanted behavior).
Perhaps a non-Microsoft file manager would provide more
sane sorting;
R.Wieser wrote:
How do I get Windows to drop all kinds of fancy sorting rules and
revert to (something like) ASCII order
A lot of behaviors in Windows Explorer are hard coded (well, all of them
are but I mean in that you don't get any options to remove some of the unwanted behavior). It will show .zip files as folders (unless you deregister the zipfldr.dll). It will handle some "special" folders differently; for example, as I recall, navigate to C:\Windows and double click on the Fonts folder. It won't show the contents of the Fonts
folder within Windows Explorer but instead opens the font manager
dialog.
Perhaps a non-Microsoft file manager would provide more sane sorting;
e.g., FreeCommander, MultiCommander, Explorer++ (all freeware). There
are free editions of crippled payware: Xplorer2 Lite, XYplorer Free, Directory Opus Light. I have not used any of them. Folks in the alt.comp.freeware newsgroup might have some experience with them. Users
that don't like the behaviors or deficiences of Windows Explorer often
use a replacement.
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 25 |
Nodes: | 8 (0 / 8) |
Uptime: | 158:31:18 |
Calls: | 1,909 |
Calls today: | 2 |
Files: | 11,079 |
Messages: | 935,349 |