Date Initially Written: 18 January 2005.
Problem: Many MP3 players that are based on USB flash drives don't allow you to sort the MP3 files in the order you want to listen to them. Instead they play the MP3 files in the order they find them; usually the order you copied them to the flash drive. How do we re-order the files?
Background: In the old DOS days Norton Utilities provided a tool called DS (Directory Sort) that would re-arrange the order of files in the FAT (File Allocation Table) directory structure. This was useful because many programs would only display or process files in the order they found them; they wouldn't allow you to sort the files. With the advent of Windows the need for DS was reduced as Windows usually sorts filenames before displaying them (i.e. in Explorer or the Windows file selector dialog box).
Many modern MP3 players are based on USB flash drives (i.e. Creative's MuVo range of MP3 players). These devices don't allow you to sort the MP3 files in the order you want to listen to them. Instead they play the MP3 files in the order they find them; usually the order you copied them to the flash drive. Unfortunately if you select a bunch of files in Windows' Explorer and copy them to your MP3 player, they don't always copy in alphabetical order (even if you have told Explorer to display the files alphabetically). And of course you may want to add new MP3 files at a latter date, which will result in them being added to the end of the directory.
Norton's old DS utilities was designed for FAT16 drives and so won't work with newer drives that are FAT32. The addition of long file names (VFAT) further complicates matters. Duncan Murdoch wrote a utility called LFNSORT which went some way to addressing the problems with Norton's DS not working with newer file systems, but unfortunately LFNSORT doesn't work with newer versions of Windows (i.e. Windows 2000 and later).
Early versions of the Windows Defrag tool would also re-sort the directory, but this ability seems to have been removed from newer versions.
Resolution Steps: There are a few programs around that allow you to sort files by filename:
If you know of any other programs then please contact me.
Update (22 April 2008): My latest MP3 player, an iAudio U2, has the ability to specify the sort order (by file name or by file date). This is a great feature that more MP3 players should implement.
Update (23 June 2010): I was contacted by Steffen who has written a clever little Windows Command Shell script that will recursively sort the files in a folder and any subfolders and files. Although developed under Windows 7 this script should work fine on Windows 2000 and later. Full documentation is included within the script file. Thanks Steffen! Download script file here.
Update (30 December 2011): Udi Cohen contacted me to let me know that he has spent some time researching the problem and has a very nice write-up about his research and the utility program that he wrote. Thanks Udi!
Update (12 August 2013): Benjamin Kent contacted me to tell me about a new freeware program that he has created called Plgen (Playlist Generator). More information and a download can be found at the Freecode page or the Sourceforge page. Thanks Benjamin!
Update (13 February 2014): Stefan Sax contacted me to tell me about his NewFAT32Sorter program, written in Java. More information and a download can be found at the GitHub page. Thanks Stefan!
Update (31 March 2015): Alessandro Sanasi contacted me to tell me about his FAT Reader program. More information and a download can be found at the FAT Reader page. Thanks Alessandro!
Recommended Reading For MP3 Users: MP3: The Definitive Guide