File sorting issue

21 views
Skip to first unread message

artemgur

unread,
Aug 1, 2025, 9:54:07 AMAug 1
to OneCommander
There is a file sorting issue in both OneCommander and Windows File Explorer. When files are sorted alphabetically, they are sorted based on their full names with extension, which sometimes leads to unexpected results.

Example
There is a directory with two files "My file.txt" and "My file revised.txt". Files are sorted alphabetically, in ascending order.

Intuitively expected sort order:
My file.txt
My file revised.txt

Actual sort order, because space goes before dot (which is from file extension) in symbols table:
My file revised.txt
My file.txt

This behavior persists even if file extensions are hidden, which makes it completely unintuitive.

I propose the followng way of alphabetical sorting:
1. Files are sorted based on their names without file extension
2. Files that have same name but different extensions are sorted based on the alphabetical order of their extensions (or based on their full names, which is equivalent in that case)

I would want this sorting behavior at least as an option in settings, because this sorting issue is annoying for me

OneCommander Support

unread,
Aug 1, 2025, 10:03:39 AMAug 1
to OneCommander
OC is using the "natural sorting" from Windows Explorer, so it behaves the same way. I tested with the same names you provided and Explorer is indeed showing the same order. I am not sure why developers at microsoft decided that space is before the dot. OC treats the names in full including the extensions when sorting. Extension visibility state doesn't affect it, as sorting does't know how the view is setup, as the view happens in a completely different part of the program after the files are already in the list. Maybe there will be some custom implementation of the natural sorting in the future and then I can look into it more closely and implement the custom logic. 

artemgur

unread,
Aug 1, 2025, 11:00:05 AMAug 1
to OneCommander
If OneCommander simply uses the sorting from Windows Explorer, then I understand that changing anything about it would be difficult. Anyway, thank you for detailed response (and for great file manager in general). Will hope for a fix in some distant future, but won't get my hopes too high

пятница, 1 августа 2025 г. в 17:03:39 UTC+3, OneCommander Support:
Reply all
Reply to author
Forward
0 new messages