Unexpected filename sorting

I have a number of files in a folder, divided into pairs, two files to each pair. One file has a name with .cut as extension, the other in the pair has the same name, and then either .mp4 or .webm as the extension (so for example, test1.cut and test1.mp4). Using 12.3.6 beta, I see errors in the way that DO sorts the files, as per this screenshot:

The yellow highlighted pairs are the incorrectly sorted ones. The .cut file should always be listed above (before) the corresponding .mp4 or .webm file.

The random filename sorting error do (or at least did) exist, but the above may be a bad example unless
you used Ctrl+click on the participating headers to make it sort on both name and extension/type.
(I believe DO takes the raw file order and then applies the selected sorting order)

The trouble with the one I've seen is that it happened with no warning, and seemed
to be limited to the (combined) filename column. When it happened there were one or
more items placed where they shouldn't be, usually near the top.

Can we see a full screenshot that includes the sort headers?

Please also post a screenshot of Folder Options > Columns and Folder Options > Display so we can see exactly how things are configured.

Note that you could do multi-column sorting on Name, then Extension to explicitly sort by both fields and keep them in a particular order.

All I know is that the other three file managers on my PC - including Windows own File Explorer - all show the files sorted correctly.

Screenie 1:

Screenie 2:

Screenie 3:

Hold Ctrl and click the Type column. It will then be second in the sort order, and used as a "tie-breaker" in cases where the first column is a tie for two files.

If you hide file extensions from the name column then two names which are the same apart from extensions will be considered identical if you are sorting only by the Name column, since they have identical values in the column.

Sigh. So DO behaves differently to every other file manager. Just wonderful.

Why then does DO not actually do this consistently? It shows over half of the files in the correct order, it is only the smaller amount that it shows wrong. If what you say is true, it should show all the files out of order.

It's not really wrong. If two things are the same as far as the sort criteria (Name column, in this case), then they can be sorted in either order with respect to each other.

If you want other columns/details to be part of the sort criteria and considered when sorting, you can specify that, and then they will, which gives you exactly what you want. (Alternatively, don't hide the file extensions and just sort by Name.)

You could equally argue that the Date Modified column should be the tie-breaker if you're sorting by the Name column and two items have identical values in the Name column?

Perhaps there should be a special case for hidden extensions. I'm not completely closed to the idea. On the other hand, it may not always be what people want. It's the first time it has been raised as a complaint, to my knowledge, so I don't know if others are depending on current behavior and would then complain themselves if it changed. (e.g. Changing it would mean you could no longer easily sort by Name, ignoring extension, and then Date. As it is now, you have the choice and can make it worth one way or the other, without being forced into either way.)

For reference, this is the old thread that led to the change in this behavior:

Unfortunately the images were hosted externally and no longer work.

I still think Opus is broken, despite the dev disagreement. Not only is the sorting not even consistent - it sorts half the files one way, the other half another way - the extension is still available to Opus, even though I have it hidden in the name column. Hiding it doesn't magically make Opus forget it even exists - it's part of the file structure! Opus should simply make use of it. It is especially frustrating that Opus is the only file manager on my system that behaves incorrectly here.

If you check out the thread Jon linked, what you're asking for is actually how Opus used to behave, back in 2009.

Someone explicitly asked for it to be changed to work the way it works now, in that thread.

So what they asked for seems broken to you, and what you're asking for seemed broken to them. :slight_smile:

It's not really "dev disagreement"; the current behaviour is due to a feature request from another user.

We could add an option somewhere to switch between the current and original behaviors. Then everyone can have what they want.

But also note that you can already get what you want by using multi-column sorting, which is already in the program.

Hi,
I was the one asking for that feature, and if you check the link provided by Jon, you can see that it was for the very same reason you're grumbling now, except that I wanted the order alphabetically reversed. Sorry for the images no longer existing but that's a very old post and I cannot find them anymore.

It is especially frustrating that Opus is the only file manager on my system that behaves incorrectly here.

Opus behaves just the way it should. From your screenshots it is clear that you have sorting order is set on Name and on Name only, hence you could not and should not expect sorting on any other column as Opus is not told to do so. Not having any sort on a column and not returning it in any sorted order the user would otherwise expect is not incorrect.

Ctrl+clicking on Type/Extension columns would sort it the way you'd want, including the ascending/descending order I had complained about, ie. CUT before or after MPEG4 or Web Movie in your case, .h and c++ in mine. The difference to other file managers (or to File Explorer at least) is that Opus sports a rather sophisticated and powerful method to sort the way you want and most others don't. So in this case, using Opus you can choose between having CUT and MPEG4/Web Movie sorted in any particular order (none, ascending or descending), while using File Explorer you get them ascending without even being asked or heeded if that was what you wanted or not.

Not only is the sorting not even consistent - it sorts half the files one way, the other half another way

It does not sort half the files this way and the rest the other. It sorts it on Name and nothing else, the rest of it is ordered (likely) the way Opus gets the list from the OS and that's most probably the date/time of the file rather than the extension/type, which makes more sense anyway.