[NTLUG:Discuss] True order of files in a directory.

Chris Cox cjcox at acm.org
Tue Aug 30 22:26:24 CDT 2005


Steve Baker wrote:
> Richard Geoffrion wrote:
...
>>
>> #examine the results and note they are not in alphabetical order.
>> ls -fla /home/sorted
>> ------------
> 
> As I said before, deleting all the files off the flash memory and copying
> them all back on again *DOES* work.  But stuffing almost a gigabyte of 
> files
> across to the drive via USB every time you want to add/move/remove a file
> gets old fast!

As Bryan already mentioned, it's not terribly hard to remake the
directory table for a DOS filesystem.  Obviously risky.. but I used
to binary edit mine all of the time.  Used to hack DOS disks
on my CP/M system in fact.

Seems the toolkits and programs are mainly focused on reading
and recovery and not so much in reordering the directory entries...
but the format is pretty well documented... could probably right
someting in your favorite scripting language even.

Not a direct solution... but certainly wouldn't be terribly
difficult to write something (IMHO).

Search wikipedia for FAT16 or FAT32 (see Directory Table).





More information about the Discuss mailing list