1 DIRECTORY The DIRECTORY command provides 7 different functions depending on the qualifiers used. o DIRECTORY/COMPRESS file - Compresses one or more directories o DIRECTORY/DUMP file - Provides a block level dump of a directory o DIRECTORY/REBUILD_MFD device - Recovers a corrupted MFD directory (000000.DIR) o DIRECTORY/RECOVER file - Recovers a corrupted directory o DIRECTORY/ALIAS device - Searches all directories on the device for alias file entries o DIRECTORY/EMPTY device - Searches the disk for empty directories o DIRECTORY/VERSION=n device - Searches all directories on the device for files which have at least n versions o DIRECTORY/FILES=n device - Searches all directories on the device that have at least n file entries Qualifiers /ALIAS, /EMPTY, and /VERSION can be combined in one command. Other combinations of qualifiers are not possible. 2 Parameters file,(@file) The /COMPRESS , /DUMP and /RECOVER qualifier require a directory- file name as a parameter. A logical name or an indirect command file can also be used as a parameter e.g.: DIR/COMPRESS @DIR.COM . Thus, it is possible to generate a list with SEARCH device/OUTPUT=file and use that file as input to the DIRECTORY command. The list generated by DFU SEARCH will contain the device name in the file specification. If a list of files is used from another source which does not contain the device name, the /DEVICE must be used to append the device name to the file. device The /ALIAS, /EMPTY , /REBUILD_MFD and /VERSION qualifier require a device name as a parameter. 2 Qualifiers /ALIAS Scan all directories on a disk for alias files. /COMPRESS Recreates and compresses the directory. Because directories are alphabetically sorted files, deleting and entering files randomly will create 'holes' in directory files. /COMPRESS will remove these holes by rebuilding and truncating the directory. /DEVICE /DEVICE=device-name Append the device name to the directory-file name. Can only be used with /COMPRESS or /DUMP /DUMP Produces a dump of the directory file block by block. This command may be useful for debugging corrupted or suspected directories. /EMPTY Scan the disk for empty directories. /FILES /FILES=n Searches all directories on the device that have at least n file entries. /FILL_FACTOR /FILL_FACTOR=percentage This qualifier is only valid in combination with /COMPRESS. Default behavior for DFU is to compress a directory as tight as possible; this is equivalent to /FILL_FACTOR=100. By choosing a lower fill factor value DFU will leave some free space in each directory block. /FILL_FACTOR may be between 50 and 100 %. Caution : choosing a fill factor value lower than 100% may fail if the directory file is not large enough. In that case DFU will signal an error and advise using a higher fill factor value. /FORMAT /FORMAT=format_string Used with /VERSION and /OUTPUT. Create an output file using the format as described in format_string. The format string MUST contain the !AS directive; DFU fills in the resultant file there. Example : DFU> DIR/VERSION=3/OUT=P.COM/FORMAT="$purge !AS" /OUTPUT /OUTPUT=filename This qualifier redirects the output from DFU to an output file. /REBUILD_MFD Rebuilds the disk's 000000.DIR directory and makes sure the file backlinks to itself. /RECOVER Rebuilds a corrupted directory file. Do not use this command on critical (system)directories! /STATISTICS /STATISTICS /NOSTATISTICS (default) Controls whether CPU and I/O consumption of the command are shown. /TEST This qualifier can be used only in conjunction with /COMPRESS. When /TEST is specified DFU will show the results of a directory compression without actually performing a compress operation. /TRUNCATE /TRUNCATE(=n) This qualifier is only valid in combination with /COMPRESS. After compressing a directory DFU will NOT truncate the empty blocks at the end of the directory, unless /TRUNCATE is specified. A number 'n' may be specified to let DFU truncate no further than 'n' blocks ('n' will be rounded up to a multiple of the disks cluster size). Example: a 60 block directory A.DIR can be compressed to 20 blocks. The results are: o DIR/COMPRESS -> A.DIR size 20/60 blocks o DIR/COMPRESS/TRUNCATE -> A.DIR size 20/20 blocks o DIR/COMPRESS/TRUNCATE=40 -> A.DIR size 20/40 blocks /VERSION /VERSION=n Scan all directories of a given device for files which have at least 'n' versions.