A bit confused about sorting by file name?

files list:

a.2.txt
a.b
a.b.a
a.b.a.txt
a.b.c
a.x

Why is it sorted in this way

It's the "Sort name and extension separately" option. With that turned on, the file extension is only used to break a tie between two identical names, otherwise it's not considered at all. If you turn it off you get this:

1 Like

thank you!
Set SORTNAMEEXTSEPARATELY=toggle