FAT-Dfrg defragments specified files on HPFS volumes.
Usage: FAT-Dfrg {Switches} <File Spec> Drive Spec(s)
FAT-Dfrg is a command line utility which simply reports the number of extents (or fragments) that each file matching the given file specification is in, and then defragments them if they are in more than a specified amount of fragments.
FAT-Dfrg is capable of defragmenting one file, one directory, one drive or all drives in one invocation.
If you tell FAT-Dfrg to defragment a non FAT drive you will get the following message:
Drive is not FAT.As FAT-Dfrg runs, it searches all specified files and determines the number of fragments each file is in. If it is in a greater number of extents than specified (a default of two), defragmentation of that file is attempted. For a file to be successfully defragmented there must be enough free space on the drive for a copy of the file. If there is insufficient space on the drive to defragment a particular file you will see the message:
<filename> Comprises <n> extents (<x> clusters). Unable to find <x> free contiguous clusters.FAT-Dfrg must also be able to obtain exclusive access to the disk. If any other processes are accessing the disk, FAT-Dfrg will not defragment the file and you will be prompted with this message:
SYS0108: The disk is in use or locked by another process.Note : FAT-Dfrg attempts to defragment a file by simply copying it to an area on the disk which is of equal size. There is no regard as to the new position of the file. This may actually fragment your free space further than it is already. Also, directories are not moved in this operation. For a complete, true packing of your directories and files, please see FAT-View (with the -d switch).
FAT-Dfrg does not attempt to defragment the file into two or more extents. It will attempt to defragment the file into one extent only.
FAT-Dfrg will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.
By default, FAT-Dfrg attempts to defragment files with more than two extents. You may use this switch to change the default. However, if you set the optimisation threshold to too small a number you may fragment the free spaces. You can use FAT-View and FAT-Info to check the number of free spaces.
FAT-Dfrg will include subdirectories as part of its search of the specified disk drives. If a subdirectory name is included as part of the file specification, then the search will include that subdirectory and all subdirectories below it. If no subdirectory is given as part of the file specification, then the current directory and all below it are included in the search.
This switch forces DEPIPE to be loaded and allows FAT-Dfrg to access disk drives located on remote machines. The Machine Name must be specified with a leading "\\". The machine name of the remote machine will have been specified when the network software on the remote machine was installed.
Note : DESVR must be running on the remote machine for this option to work.
Consult Appendix H - DESVR for further details.
FAT-DfrgFAT-Dfrg will attempt to defragment all files in the current directory.
FAT-Dfrg /sFAT-Dfrg will attempt to defragment all files in the current directory and all directories below it.
FAT-Dfrg -hFAT-Dfrg will attempt to defragment all files with more than two extents on all hard disks.
FAT-Dfrg -o3This changes the optimisation threshold to files with more than three extents and attempts to optimise all files in the current directory.
FAT-DFRG -on \\DATA C:\ /sFAT-Dfrg will attempt to defragment all files with more than two extents on drive C: on the remote machine named DATA.