Sorting in policies folder

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

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

Sorting in policies folder

Post by *wanderer »

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 -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1571
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

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 -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1571
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Here's an example...

http://imgur.com/a/zRP0X

TC v8.52a
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1571
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

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 -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

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).
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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