SYNOPSIS

fatsort [options] device

DESCRIPTION

FATsort sorts directory structures of FAT filesystems. Many MP3 hardware players don't sort files automatically but play them in the order they were transmitted to the device. FATSort can help here.

OPTIONS

-c

This option causes FATSort to ignore the case of filenames (e.g. 'example.mp3' is equal to 'EXAMPLE.MP3').

-f

Force sorting even if the device is mounted or if FATSort cannot determine if the device is mounted.

-h

Shows some help information.

-i

Prints some file system information of the specified device.

-l

FATSort will not sort directory structures, but just print the current order.

-otype

This options specifies how FATSort will sort files and directories. type can be 'd' for directories before files (which is the default), 'f' for files before directories, or 'a' for no differentiation between files and directories.

-n

Uses natural order to sort directory structures instead of alphanumeric order. For example, an alphanumeric order would be

file123.mp3

file21.mp3

file3.mp3

and the corresponding natural order would be

file3.mp3

file21.mp3

file123.mp3.

-q

FATSort will work quietly without printing additional information messages.

-r

Sorts the directories in reverse order (Z-A).

-R

Sorts the directories in random order.

-v

Shows version information only.

The following options can be specified multiple times:

-ddirectory

Sort directory only

-Ddirectory

Sort directory and all subdirectories

-xdirectory

Don't sort directory

-Xdirectory

Don't sort directory and all subdirectories

-Iprefix

Ignore filename prefix prefix during sorting. For example, passing option -I "the " tells FATSort to sort 'The Beatles.mp3' like 'Beatles.mp3'.

EXAMPLES

Sort FAT filesystem on an USB stick:

fatsort /dev/sda1

Sort FAT filesystem in a file:

fatsort /home/user/fat16_fs.img

Sort directory /dir1 and all subdirectories except /dir1/dirA:

fatsort /dev/sda1 -D /dir1 -x /dir1/dirA

Ignore prefixes 'a ' and 'the ' during sorting:

fatsort /dev/sda1 -I a -I the

AUTHOR

Boris Leidner <fatsort(at)formenos.de>

RELATED TO fatsort…

NOTES

FAT12 is not supported yet.

REPORT BUGS

Please report bugs to fatsort(at)formenos.de. Thanks.