0

I'm loading up a thumbdrive with music for my car. The folders play out of order. I did a "dir" of the folders from command line, and the order matches - but neither is alphabetical. Windows Explorer shows them in alphabetical order.

  1. Why is this?
  2. How did this happen?
  3. How do I fix?

Here's what I get when I type "dir" from the command line (not including full folder names). My first thought was something screwy with the 8.3, but it's out of order too.

Adebisi Sh
Anathema-W
Chrome Hoo
cloudkicke
Echolyn-Ec
Magma - Em
Red Sparow
Rocky's Fi
SKE - 1000
wobbler -
Porcupine
Blackfield
Anglagard
Nicklas Ba
Uzva-Uoma
Sanhedrin
Russian Ci
Return To

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
mbourgon
  • 1,286
  • 2
  • 17
  • 35
  • I just used `dir` on the command line on my Windows 7 computer, and it's in alphabetical order. – desbest Aug 11 '12 at 22:41
  • 5
    Short answer: "dir" shows the raw order in the file system. Different file systems have different raw orders. Explorer sorts them. – Raymond Chen Aug 11 '12 at 22:46
  • Wow - talk about getting an answer from the source! Thanks! It's using NTFS on Win7 x64. I tried creating new folders to put the files in, and I think it's using creation date plus name - all the new folders are at the end. Back to the main question - short of making new folders and dropping the files in there, is there a easy way to set them up? Thanks, but I think I may have a workaround. – mbourgon Aug 12 '12 at 02:58
  • 1
    This is not about programming. You can find the explanation in Raymond Chen's blog: [What order does the DIR command arrange files if no sort order is specified?](https://devblogs.microsoft.com/oldnewthing/?p=1603). Cross-site duplicate: [Default file order of "dir" command in Windows console](https://superuser.com/q/481570/241386). There are various tools for reordering purpose in car mp3 players that you can find in my answer there – phuclv Apr 27 '19 at 15:48

0 Answers0