Sort files on USB flash drives with DriveSort


Phew, haven’t posted anything in over two months! It’s not that I didn’t have enough to write, but at the moment I just don’t have the time and rest for it. And if I do have some time, then the brilliant weather makes me prefer staying outside on the terrace with a glass of wine, waiting for the fireflies instead of writing a blog post. (I could of course be so nerdy and write my post outside on a laptop … But no, thanks.) ;)

But be that as it may! Today, I will make a little addendum to my last post about FAT32-formatted external hard drives. For after I had joyfully copied all sorts of TV shows to my external disk, I ran into a problem that probably everybody has already experienced with his MP3 player, car radio, etc.: The device doesn’t play the files in alphabetical or numerical order, but exactly the way they are physically stored on the disk or stick. So if you first copy “Zager & Evans – In the Year 2525” to your MP3 player and then “Aerosmith – Pink”, the computer will by default display the two songs in beautiful alphabetical order – however, your MP3 player will always play Zager & Evans first, even if A does usually come before Z.

DriveSort
DriveSort

Thanks to Google I found the small tool DriveSort, which remedies this. It gets down to the root of the trouble and changes the order directly in the file table of the hard disk or flash drive. To do this, simply choose your USB flash drive via “Disk” → “Open…”, click the small arrow next to the sort button as shown in the screenshot, and check “Long Name Sort” and “Order” → “Ascending”. Then click the sort button, and all files will be sorted alphanumerically as is usual!

Update (4th August 2016)

Christian mentioned in the comments that, in order for the changes to persist, you also need to click the “Save” button right next to the sorting button. (Although I believe that it did work for me without that final click, I’m not completely sure, because it has been a while since I last used the program. ;) So, to be safe, click “Save”!)

There remains only one question: With today’s state-of-the-art technology, is it really still that impossible to give all USB players a simple, built-in sorting function?

Update (19th July 2010)

As chance would have it, I stumbled upon a second, very similar program: FolderSort. I didn’t test it myself, but I thought I’d at least mention it here.

Update (25th January 2013)

Martin commented a way to solve the problem on Unix machines. You don’t even need an additional program. Just open a shell prompt and type the following:

ls /path/to/album/ | sort | touch *

Brilliant! Thanks, Martin!


17 responses to “Sort files on USB flash drives with DriveSort”

  1. Oh, Hammer!!!!

    Wer sich wie ich ein Autoradio kauft, das nur Radio und USB hat (geiles Teil übrigens) und da eine 8 GB Speicherkarte rein rammt auf die man vorher mühevoll seine Hörbücher gerippt hat – und dann während der Fahrt NIX versteht, weil die Kapitel alle durcheinander sind, der weiß wovon Du schreibst.
    Ich habe es daraufhin mit WinAmp und einem Plugin versucht – hat funktioniert, war aber zeitaufwändig und mühevoll. Ätzend!
    Wenn Dein Tool hält, was es verspricht, hast Du mein Leben gerade bereichert!!!!
    Ich teste!

  2. Wie Harry es schon geschrieben hat, ich bin auch ein Leidtragender des grausamen Sortiersystem meines Autoradios… Dann kommen hier und da mal neue Lieder dazu und die sortieren sich einfach nicht ein… Das macht man 5 mal und schon sitzt man die Hälfte der Fahrt mit einer Hand am Radio, um sein neues Lieblingslied zu suchen. Jetzt habe ich das Problem nicht mehr, danke für den tollen Tip^^

  3. Thank you so much for this!

    I play music in my car off a USB, and I’ve spent ages trying to get it to play songs in the correct order, but have had no luck.

    This program fixed the problem in <5 minutes :D

  4. 1) On most Unix-ish systems, the “ls” command sorts its output alphnumerically by default. In fact, there is usually a ‘-f’ option to NOT sort the output. Piping the output of “ls” to “sort” not harmful, but most likely redundant.

    2) On most Unix-ish systems, the “touch” command does not read anything useful from standard input. Piping a bunch of text, be it filenames or anything else, won’t affect its operation.

    So all “ls /path/to/album | sort | touch *” may as well be just “touch *”. All it really does is update the timestamp of all files/folder in the CURRENT directory. If you happen to be in /path/to/album when you do this, good for you. Otherwise you probably just set the timestamps of everything in the root of your home directory to the current time/date.

    Even if you do run “touch *” on the correct files, it may well execute fast enough that many if not all of the files will have the exact same timestamp, which may not gain you any sorted advantage.

    Finally, ordering the files by timestamp may work for some players, but for most you really do have to reorder the FAT entries on disk with a utility like Fat32Sorter or DriveSort.

Leave a Reply

Your email address will not be published. Required fields are marked *