Fenux.Net - The Life of a Geek
FAT Sorter v1.0.4
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).

20750 responses to FAT Sorter v1.0.4

Page 1 of 184
cduzhdo mjqittx
Pascal /n./ A programming language named after a man who would turn over in his grave if he knew about it.
Posted: Today, 08:31 by Cialis sample pack
eagoohk kdddijm
Emulate your heros, but don't carry it too far. Especially if they are dead.
Posted: Today, 04:25 by Compare electronic cigarettes
kwpjerk suaegzx
Early to rise, Early to bed, Makes a man healthy but socially dead.
Posted: Yesterday, 18:01 by Ativan
fyatyhp dhqubnd
The secret of a good sermon is to have a good beginning and a good ending, then having the two as close together as possible.
Posted: Yesterday, 02:44 by Metallic taste in mouth and provigil
vrhnpbb jdhrupn
Biologically speaking, if something bites you it's more likely to be female.
Posted: Apr 19th, 21:33 by Take levitra daily
cakmiir eapcxhz
Why do grandparents and grandchildren get along so well? They have the same enemy -- the mother.
Posted: Apr 19th, 10:33 by Generic Cialis
cheap zithromax pills 4rcsp1s1
b http://www.yesnany.com/store/pharm/24-7-pharmacy-inderal.php 24 7 pharmacy inderal ef88fpgn, http://directory.my-medicare.com/link_to_us.html real viagra jvrudjec, http://teamnetworkers.com/guestbook.cgi viagra online store 6szestu1, http://www.yesnany.com/store/pharm/amitriptylin-on-line.php amitriptylin on line he58f5r4.
Posted: Apr 19th, 02:12 by RolandoDed
psgmskt nofllev
A state of war only serves as an excuse for domestic tyranny.
Posted: Apr 18th, 19:04 by Discount levitra
ovnjybd kmepzgw
From the moment I picked your book up until I laid it down I was convulsed with laughter. Some day I intend reading it.
Posted: Apr 18th, 12:02 by hcg
auwsujc vjlplcj
All things are possible, except skiing through a revolving door.
Posted: Apr 18th, 03:30 by Carisoprodol
fsmkles ffvvehb
A pint of sweat, saves a gallon of blood.
Posted: Apr 18th, 01:25 by Generic Valium
wmuzhlh pomzchw
In all large corporations, there is a pervasive fear that someone, somewhere is having fun with a computer on company time. Networks help alleviate that fear.
Posted: Apr 17th, 11:41 by hcg slenderize
vgpzwxn yjlefdb
No one can earn a million dollars honestly.
jljfmfn exwhkgi
Happiness is good health and a bad memory.
Posted: Apr 16th, 19:29 by Electronic cigarette gdl
dwrvqip cltuxhj
I was raised in the Jewish tradition, taught never to marry a Gentile woman, shave on a Saturday night and, most especially, never to shave a Gentile woman on a Saturday night.
Page 1 of 184
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