Default files sort order used by "dir" command / core Windows 10

It's the filesystem order – in file managers it would be called "no sort order whatsoever".

For FAT filesystems, a directory is stored as a simple list of the file entries in series. Whenever a file is deleted, its slot is marked as empty. Whenever a new file is added, it occupies the first slot that's free, which might be at the end or somewhere in the middle. (That's slightly simplified – for example, in reality, "long" file names occupy multiple slots – but it should get the point across.)

(This is not exactly the same as ordering by creation date, as it's determined based on when the file was placed in that specific folder, not when it was created overall.)

This means that one way of sorting the files is to create a new directory, then move files into it one by one in the exact order that you want. Many players work the same way as yours, so there already exist tools for achieving that:

  • How to reorder the files of a FAT32 file system?
  • http://www.anerty.net/software/file/DriveSort/?lang=en
  • http://manpages.ubuntu.com/manpages/xenial/man1/fatsort.1.html
  • https://softwarerecs.stackexchange.com/questions/19575/sort-folders-on-fat32-drive-from-a-windows-command-line
  • https://jansipke.nl/sorting-files-alphabetically-on-fat-filesystems-usb-disks-sd-cards/

Meanwhile, for the NTFS filesystem, directory entries are stored in a B+tree, so they're always in a well-defined order – if I remember correctly NTFS orders the entries based on the UTF-16 form of the file name.