Sorting of files alpha-numerically

Dopus 10.1.0.0 Sorts files alpha-numerically incorrectly. For example, it sorts the following correctly:

Part 1.mp4
Part 2.mp4
Part 2-2.mp4
Part 2-3.mp4
Part 3.mp4

However, if there is text after the numbers, it messes up:

Part 1 (1 of 5).mp4
Part 2-2 (3 of 5).mp4
Part 2-3 (4 of 5).mp4
Part 2 (2 of 5).mp4
Part 3 (5 of 5).mp4

Regards,
SSY

You can turn off Numeric order filename sorting, in Folder Options -> Display, for an alternative sorting method.

No sorting method will do the "right" thing in every situation, since it's often arbitrary and requires human judgement about which parts of the name matter.

I cannot find what you are saying in Settings -> Preferences. Filtering by 'sort' doesn't show anything on numeric sorting either. By the way, Windows 7 shows the files correctly in alpha-numeric order.

You need to look in Folder Options, not Preferences. See gpsoft.com.au/help/opus10/Do ... ptions.htm

I saw a post here ([url]Numeric Sorting (Was: Sort Bug?)]) about your algorithm. I would like to suggest the following:

  1. sort by number before letter
  2. if numbers are different lengths (because they can be very large), sort by string length.
  3. if a number is encountered in string 1 at index n and a letter is found at string 2 at index n, sort string 1 first.
  4. if a number is encountered in string 1 at index n and a number is found at string 2 at index n, get all digits from string 1 and string 2 at index n and sort them numerically.

Thanks for the suggestion!

Isn't it just a matter of setting order of sorting for letters, numbers and other characters, plus space, with the only exception being treating numbers (multiple unseparated digits) as a one item?

In this example:
Part 1 (1 of 5).mp4
Part 2-2 (3 of 5).mp4
Part 2-3 (4 of 5).mp4
Part 2 (2 of 5).mp4
Part 3 (5 of 5).mp4

You need to set 'sort space before other characters' in order to work as expected.

If I had some really weird files names as these:

1
985
2
58
18446744073709551615
s34
7
0000000000807
11
100
17
184467440737095516151844674407370955161518446744073709551618
15
18446744073709551614
s56
9
x87
35
18446744073709551616
00001
3
10
184467440737095516151844674407370955161518446744073709551611

I would want to sort them like this:

1
00001
2
3
7
9
10
11
15
17
35
58
100
0000000000807
985
18446744073709551614
18446744073709551615
18446744073709551616
184467440737095516151844674407370955161518446744073709551611
184467440737095516151844674407370955161518446744073709551618
s34
s56
x87

I would
[ul]

  • Ignore preceding zeroes, e.g. 100 sorts before 0000000000807
  • Numbers should be compared alphabetically (especially if they are very long)
  • Sort letters after numbers
    [/ul]

If I had some really weird files names as these:

a
A

A
a1

a1
A1

A1
a2

aaa
aAa

Ab1a
Ab1A

ab1A
Ab1a

A 1
A   1
A 2
A1
A2

1
2
10

AAA A
aaa B

I would want to sort them like this:










1
2
10
a
A
A
A 1
A 2
A   1
a1
a1
A1
A1
A1
a2
A2
aaa
aAa
AAA A
aaa B
ab1A
Ab1a
Ab1a
Ab1A

I would
[ul]

  • Sort spaces first
  • Sort lower case before upper case. Exception: If a portion of two strings are equal, ignoring case, sort by the remaining parts. e.g. 'aaa' sorts before 'AAA'. However, if we had 'aaa B' and 'AAA A', sort 'AAA A' before 'aaa B' because 'aaa ' and 'AAA ' are equal (ignoring case) and we consider only 'A' and 'B.
  • Numbers that appear in combination with strings should be compared together as a whole number. e.g. if comparing 'a123b ' to 'a00012c', I would sort like this step-by-step (grabbing numbers together greedily as in regular expressions):
    [ul]
  • Grab first token and compare: 'a' is equal to 'a'
  • Grab next token and compare: '123' and '00012' becomes '123' and '12' so '123' < '12'
  • Sort a00012c before a123b'
    [/ul]
    [/ul]

Meant to say '123' > '12' so sort 'a00012c' before 'a123b'.

@Spitfire: as you have seen, and as Leo mentioned - there are several cases where you could suggest changes to sorting. But from your very first post, just know that enabling BOTH 'Numeric order filename sorting' AND 'Word sort (special handling for hyphens, etc)' in Folder Options will give you the result you were after in that particular case. Obviously there are other cases though that could use some enhancement in sort options...

Thanks a bunch. That'll do for now. :slight_smile: