DIYMobileAudio.com Car Stereo Forum banner

USB Drive Sorter/Alphabetizer Program (v0.1)

16K views 11 replies 8 participants last post by  karmajack  
#1 ·
I noticed my JVC head unit does not sort the folders of a USB drive alphabetically; instead, it's just in the order the folders were created on the drive. So (for example) if I added an "All That Remains" folder, it would be the last folder in order, instead of one of the first. After hearing somebody else had the same issue with a fancy Pioneer AVH-4200NEX, I figured this must be a widespread issue, so I made a program to fix it and thought I'd share it here in case anybody else needed it.

https://github.com/MWisBest/StereoUSBSorter/releases

It's really simple to use:
Image
Image

Image
Image


It doesn't need to be run as an administrator or anything, and the code is all there for anybody to inspect or improve or whatever. I've done the best I can to make it safe, i.e. one small issue won't completely destroy your drive like some of the alternative programs I discovered, but I still suggest you make a backup or your files before using this!

How it works is pretty simple. In layman's terms, a flash drive has a table listing all the folders on it, and when you add a new folder, it just gets tacked on to the end of the table. Simple embedded devices like a head unit read this table as-is, and don't sort it afterwards like your PC does. So to fix it, I go through all the folders in alphabetical order, I move them to a temporary folder, and then move them back. Effectively what this does to the table is move that folder to the end of the table. Do this in order to every folder, and it's sorted. This doesn't rewrite/stress the drive or anything, it only takes a few seconds to complete.
 
#4 ·
I used a program before called Drivesort. I had similar issues while using a Kenwood radio with USB. The index would show files as they were created. The newest date would become the last file, not alphabetical.
 
#7 ·
The problem I have with DriveSort and all the other programs like it, is they modify the filesystem at a very low level and are completely specific to FAT32. My program is less risky IMO, it works on other filesystems like exFAT, and it should run on Mac and Linux as well (using Mono).

Works great on my Pioneer. Thanks MWisBest
This is a life saver. No more moving all my files back on to my computer so that I can add a new folder. Thanks!!!
Glad to hear it's working for you guys, thanks! I'm still working on other features as well like custom sorting and an interface that isn't so ugly :p
 
#9 ·
Is it possible to sort the songs in the folder by track number (possibly in a future release)?

One of my biggest gripes is when you play a folder and the songs are listed alphabetically instead of by track number. Screws with transitions from one song to the next. I need a program that sorts albums alphabetically, then the songs within a folder by track number as the artist intended.
 
#10 ·
From what I can tell, head units are sorting individual files alphabetically, instead of by drive order/date like folders. I just prefix my file names with the track numbers, e.g. "01. Track Name.flac". I don't think there's any way around that unfortunately. I could add automatic file renaming based on the tags of each file, but that's about it. :/
 
#12 ·
I'll give this a try next time I add something.
I use a 64 GB flash drive with my 6100 Nex about 3/4 full. I've been using Drivesort with no issue, but willing to try this if the UI is cleaner and simpler. I go so long between adding stuff, that I have to relearn Drivesort procedures every time.