'Confused by sorting in Windows explorer and other tools

I have a file list. It is "sorted by name" in windows explorer as:

20180714_1502 - 134.JPG
20180714_1548 - 143.JPG
20180714_1727 - 150.JPG
20180714_112154.jpg
20180714_112203.jpg
20180714_112229.jpg
..
20180714_183629.jpg
20180714_183637.jpg
20180714_183645.jpg

Where I would expect that it (the first part) would be sorted as:

20180714_1502 - 134.JPG
20180714_1548 - 143.JPG
20180714_1727 - 150.JPG
20180714_183629.jpg
20180714_183637.jpg
20180714_183645.jpg

Can anyone explain what the idea behind this MS ordering is? I have read some articles about natural sorting. What is natural at the MS way of sorting? There is at least a difference with the way different tools (like Total Commander) does the sorting, leading to confusion and errors.



Solution 1:[1]

Basic sorting functions like strcmp just compares one character at the time. Explorer uses StrCmpLogicalW:

Digits in the strings are considered as numerical content rather than text. This test is not case-sensitive.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anders