Fenux.Net - The Life of a Geek
FAT Sorter v1.0.4
Coding
Posted on 4/21/2008 4:27 pm in Coding

What is it?

A "simple" program to sort files on a FAT file system. The target scenario for it is to sort the files and folders on a USB flash drive alphabetically, so they are loaded properly on devices that read them.

But why?

I bought a cheap car stereo about a year ago that plays MP3 files from either CD or from a USB flash drive or a compact flash memory card. However, it plays them in the order that they were added to the device.

Sometimes, Windows doesn't copy the files over in the right order, or if files are added at a later date, they stay at the end. When I listen to full albums in the car, it bugs me when they play out of order.

I searched around for a utility to correct the problem, but none of them supported recursion of subfolders. So I decided to make one.

Why it is necessary

The FAT file system doesn't support sorting directory entries. However, this is the only file system for USB flash drives that is widely supported. Unless the hardware or software accessing the device (like your computer) resorts them for display, the files will show in the order they were added to the directory.

How we get around it

To get around the problem, we cheat. By making a temporary directory, moving all the files to it, and then moving them back, in the new order, we effectively resort the directory. We then repeat the process in each directory listed. Sorter does this in reverse order, but not for any reason other than it makes the progress bar more accurate, because it knows how many files are there before it starts.

Why do you say it's a "simple" program

The actual sorting process is fairly straight forward. However, it offered me an excuse to play with technologies I hadn't gotten to use yet, like WPF (Windows Presentation Framework) and threading. I've also added basic support for localization, but as I don't speak any other languages, I haven't made any translations for it. With all that in mind, the program ended up quite a bit more complicated than necessary, but it doesn't hurt anything.

What does it require?

The program requires Windows XP or later and the .NET Framework 3.5. It will allow you to download the framework when you install it, so you don't have to install it beforehand.

Where can I get it?

You can download the file directly here. It also includes (most of) the source code for the program, if you want to take a look. I've released it as open source (see the included license for details).

20957 responses to FAT Sorter v1.0.4

Page 1 of 198
tqyejwe mnhills
Beware of computer programmers that carry screwdrivers.
Posted: Jul 14th, 23:36 by Viagria vs cialis
rgfiwid bpwower
Fill what's empty, empty what's full, and scratch where it itches.
Posted: Jul 14th, 07:08 by Cheap cialis
hfxhymh eafckli
UNIX is simple. It just takes a genius to understand its simplicity.
Posted: Jul 13th, 20:13 by Tadalafil cialis from india
taidcwa pljvfui
Java: the elegant simplicity of C++ and the blazing speed of Smalltalk.
gctgckj gqtbwow
No one can earn a million dollars honestly.
Posted: Jul 12th, 12:02 by Comparison viagra cialis
Clean chinese tuition you room, please follow me. This approach is that \nlearning another language was the physical world
Clean chinese tuition you room, please follow me. This approach <br />\nis that learning another language was the physical world around <br />\nthem. When faced chinese tuition with different colors within the <br />\nunfamiliar character.
Posted: Jul 11th, 09:17 by Chauncey
hzpddla nqsxdoz
I don't want to achieve immortality through my work; I want to achieve immortality through not dying.
Posted: Jul 9th, 20:12 by Viagra
qpdcigy izttpwq
Pardon him, Theodotus; he is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Posted: Jul 9th, 15:47 by Buy cheap cialis
vbvijyc kypeglz
Comedy is nothing more than tragedy deferred.
Posted: Jul 9th, 09:56 by Cialis for women
sjioiwi hgicgwf
Distrust any enterprise that requires new clothes.
Posted: Jul 8th, 08:26 by Take cialis and viagra together
jptopqo tasmlie
Don't drive me crazy -- it's within walking distance.
Posted: Jul 8th, 02:55 by Mail order viagra without prescription
gykrovw fykhter
Human history becomes more and more a race between education and catastrophe.
Posted: Jul 6th, 11:30 by Zithromax sinus infection
bjolnjc sdvzfir
If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.
Posted: Jul 4th, 13:41 by Viagra samples
miqqwfd hvzckfr
Everybody wants to go to heaven, but nobody wants to die.
kfpslgu uwfordh
O'Toole's Corollary of Finagle's Law: The perversity of the Universe tends towards a maximum.
Posted: Jul 3rd, 02:57 by Purchase phentermine
Page 1 of 198
Creative Commons License  Subscribe with Bloglines  Get Daily Wisdom!
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.
© 2000-2014 Jason Burgess