Sorting in policies folder

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1285
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Sorting in policies folder

Post by *wanderer » 2016-10-05, 13:54 UTC

On a domain controller, i went to C:\Windows\SYSVOL\sysvol\<domain>\Policies\ folder. Several subfolder named {xxxx-xxxx-xxxx...} existed under there (SIDs) but even though the sorting was set to "by extension", they appeared unsorted. Is there an explanation for this or it's a bug? I assume the latter.

- - - Wanderer - - -


¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Latest TC / Mainly Win7x64 SP1, WinXPx32 SP3

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-10-05, 19:28 UTC

Folders are not sorted by extension, even if you choose to sort folders like files. It has been disabled by popular demand.
However, you can re-enable it manually.

Please add the following string to the file wincmd.ini, section [Configuration]:
SortDirExt=1

You can edit the wincmd.ini via Configuration - Change settings files directly.
Author of Total Commander
http://www.ghisler.com

User avatar
wanderer
Power Member
Power Member
Posts: 1285
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer » 2016-10-05, 19:34 UTC

ghisler(Author) wrote:Folders are not sorted by extension, even if you choose to sort folders like files. It has been disabled by popular demand.
However, you can re-enable it manually.

Please add the following string to the file wincmd.ini, section [Configuration]:
SortDirExt=1

You can edit the wincmd.ini via Configuration - Change settings files directly.
OK, i guess i wasn't clear on this. I know folders are sorted by name. The problem is that the folders i'm talking about have no extension but they are also not sorted by name. They all start with {, and with } and have SIDs in between (sets of numbers separated by -'s. Is there a reason they appear totally unsorted - or rather sorted in a strange order?

- - - Wanderer - - -


¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Latest TC / Mainly Win7x64 SP1, WinXPx32 SP3

User avatar
wanderer
Power Member
Power Member
Posts: 1285
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer » 2016-10-05, 19:40 UTC

Here's an example...

http://imgur.com/a/zRP0X

TC v8.52a

- - - Wanderer - - -


¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Latest TC / Mainly Win7x64 SP1, WinXPx32 SP3

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-10-05, 19:58 UTC

Are you using "natural sorting"? This uses a Windows mechanism to sort both by characters and numbers. The function probably gets confused by the numbers in these names.
Author of Total Commander
http://www.ghisler.com

User avatar
wanderer
Power Member
Power Member
Posts: 1285
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer » 2016-10-05, 20:12 UTC

Ha. Yes, that's the case.

I have "Nat. sort.: aplha and numbers". Changed to "Strictly by num. char code" and it sorted them normally.

Thanks.

- - - Wanderer - - -


¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Latest TC / Mainly Win7x64 SP1, WinXPx32 SP3

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-10-05, 20:15 UTC

It uses StrCmpLogicalW from Shlwapi library - it leads to different results depending on the installed language. The Explorer seems to use this function too.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 7980
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2016-10-05, 20:19 UTC

You can find a similar directory in c:\windows\installer to test with.

Here SortUpper=0, 1 or 3 seems to sort these entries correct, but not SortUpper=3.

NTFS also seems to sort them OK (test with Ctrl+F7 Unsorted).
#524
Danish Total Commander Translator
TC 9.21rc3a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit and TC 2.91b3 on Android 6.0
Get Extended Total Commander Menus

User avatar
MVV
Power Member
Power Member
Posts: 8087
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2016-10-06, 07:31 UTC

Stupid sorting of hex numbers is one of the main reasons why I don't use natural sorting. :D

Post Reply