Are different non-alphanumeric symbols—when used at the beginning of a filename—treated differently when sorting alphabetically?

1

I’ve long used the trick of adding a dot to the beginning of a folder name so that it always appears at the top of a list of folders when they are sorted alphabetically.

But is there an “alphabetical” order among symbols, or will using any symbol in front of a filename or folder name lead to that file/folder being sorted at the beginning of a list? Are there symbols which would appear at the end of an alphabetical sort?

Dan C

Posted 2015-03-24T19:26:40.630

Reputation: 177

1What research have you done? Have you tried using other characters to see what happens? – CharlieRB – 2015-03-24T19:34:56.980

Answers

2

Windows sorts by Unicode, so ! would be first.

Starting with Windows XP SP1, Microsoft has made available a registry key that can suppress the use of StrCmpLogicalW API, turning off Windows numerical sort and reverting Windows Explorer to treating file names as strings. The registry key is as follows:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer\NoStrCmpLogical

More info can be found in this document titled, “The sort order for files and folders whose names contain numerals is different in Windows Vista, Windows XP, and Windows Server 2003 than it is in Windows 2000.”

Zvi Twersky

Posted 2015-03-24T19:26:40.630

Reputation: 252

He asked "Are there symbols which would appear at the end of an alphabetical sort" well, if he hadn't changed the registry setting I wrote in my answer, then the letters, numbers and symbols would be sorted by the Unicode chart. Seems pretty clear. – Zvi Twersky – 2015-03-24T19:46:09.530

1That is fine. I see what you are saying, but I don't read the question that way. I'll remove my comment and let the OP clarify. – CharlieRB – 2015-03-24T19:52:36.590