Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use a USB drive to play music in my car. Unfortunately, the car does not sort the music alphabetically and relies on how the music is sorted on the FAT32 drive.

This Windows software here solves the problem. Anything comparable available for me on Ubuntu?

PS: at first I thought it was a file creation date problem askubuntu question. But although I figured out the answer to that question, it didn't solve the problem like I thought it would.

share|improve this question
Have you tried to run the software with Wine? – Uri Herrera Jul 2 '12 at 20:11
See existing question and answer :… – Adrian Oct 13 '13 at 13:39

You might want to use fatsort which is available in Ubuntu and was designed to solve your exact problem. Cheers,

share|improve this answer
Works really great and fast! – desgua Jan 30 '14 at 9:27

fatsort solves the problem. First install fatsort then, list partitions in order to get the usb key device path

cat /proc/partitions

Let's take /dev/sde1 as an example.


sudo fatsort -f /dev/sde1

problem solved, without wine nor windows ;-)

share|improve this answer

Your best bet is to use DriveSort under Wine, as its author recommends

To quote DriveSort's author, the program is "tightly bound to Microsoft APIs", so I doubt you will find a native Linux equivalent where a non-native filesystem (FAT) is concerned.

You can run it under Wine as the author has tried and recommended, with some caveats:

  • You must run it with gksudo
  • You will need mfc42u.dll, which you can install in the same directory from the internet (google), or install it using the winetricks package.
  • Once sorting is completed, DriveSort attempts to unmount/remount the drive; remounting doesn't succeed in Wine, so you can either safely pull out the USB for use, or manually remount it.
share|improve this answer

It is a lazy solution, but you could just move the files out and than in again ...

create a temporary dir

mkdir /tmp/mydrive

move all files out

mv /media/thumbdrive/* /tmp/mydrive

and then all in again

mv /tmp/mydrive/* /media/thumbdrive

this might get the files in the thumbdrive in alfabetical order. I am not sure though ... Try it out

You might also want to look at: Sort files on the filesystem (same question) and at: (some program recomendations)

share|improve this answer
This would work, if you used some shell logic, as "find" and "ls" commands don't list alphabetically either. find | sort -n > /tmp/filelist, then for file in filelist, do cp $file... something like that would work. But it is awfully slow writing to flash drives. – kevinf Apr 15 at 13:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.