Why Aren't My Images Sorted?

Why Aren't My Images Sorted?

You've just arrived at a meeting with your prospective wedding clients. Examples of a canvas, acrylic, and aluminum are with you, but first up is a slideshow sequence you've authored as a video. You're there to impress and so whip out the pico projector and plug in the USB stick. This is going to be big — two meters big. You navigate to the video folder which has 30 or 40 files in it. And… they are only vaguely sorted by name. Where the heck is the file you are looking for?

If this sounds familiar to you, then you are possibly one of the significant minority that have come across the problem of hardware operating systems not sorting files as you'd expect them to. Hardware devices like cameras, pico projectors, mp3 players, TV recorders, DVD players, in fact pretty much everything that is digital in any way and runs software will have an embedded operating system. Increasingly this is a variant of Linux, although not always.

You'd expect files to be listed by name, possibly with the ability to change the sort order by date. And most, in fact nearly all, work this way. I mean, how else are you likely to want to look for things on an embedded device, particularly when you are using a very simple interface controller such as a remote control?

Well, occasionally, very occasionally, you'll come across something that doesn't, like my PicoGenie P100, and it's immensely infuriating. The first obvious thought (for me) was that it's actually using something like the file modified date. Queue changing the file modified date using the very useful Xplorer2 File Manager in one go, then trying again. Nope.

I then realized that the files were actually sorted by name, but every time I added a new file it was tagged at the end. That led me to the realization that the projector wasn't actually sorting anything. Really! When files are copied to a (FAT32) USB stick, the names and disk sector are written to the file allocation table (FAT) which records what is stored where; the default operation is to write these in alphabetical order and then simply tag new files to the end of the table. The pico projector was reading this list directly with no sorting whatsoever. That's some very lazy coding by the programmers of the firmware where they had simply taken the least cost route to listing the files.

What I actually needed to do was leave the files on the stick and re-write the FAT, sorted. Enter DriveSort, a totally simple software that just does what it says on the tin. In DriveSort parlance there are several steps you want to follow:

  1. Insert USB

  2. "Open a disk"

  3. "Sort current folder" (by short name)

  4. "Save current folder"

  5. "Close the disk"

DriveSort main screen.

This will sort the files on the USB stick then rewrite the FAT in filename sorted order. Now, when you browse the files on your embedded device they will be in the correct order, making things much simpler for finding files.

Hopefully this might make someone else's life just a little bit easier.

Lead image by Hans via Pixabay.

Log in or register to post comments

4 Comments

Bill Peppas's picture

Whoever codes like this, needs to be fired and locked up in a prison cell with lifetime computer usage ban :D
Seriously, who in their right mind and with any skill level over "very basic, total amateur" would do that ?

Mike Smith's picture

I know! Enough for someone to code DriveSort. Itll be interesting to see if anyone else does!

Gabrielle Colton's picture

Thank you for this, I always need tips on organization, I am terrible at it

Mike Smith's picture

Sort your way to image nirvana ;)