Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DEFRAG
◄Notes► ◄Example►
────────────────────────────────────────────────────────────────────────────
DEFRAG
Reorganizes the files on a disk to optimize disk performance. Do not use
this command when Windows is running.
Syntax
DEFRAG [drive:] [/F] [/S[:]order] [/B] [/SKIPHIGH] [/LCD | /BW | /G0]
[/H]
DEFRAG [drive:] [/U] [/B] [/SKIPHIGH] [/LCD | /BW | /G0] [/H]
Parameter
drive:
Specifies the drive that contains the disk you want to optimize.
Switches
/F
Defragments files and ensures that the disk contains no empty spaces
between files.
/U
Defragments files and leaves empty spaces, if any, between files.
/S
Controls how the files are sorted in their directories. If you omit this
switch, DEFRAG uses the current order on the disk. The colon (:) is
optional. The following list describes each of the values you can use to
sort files. Use any combination of the values, and do not separate these
values with spaces.
N
In alphabetic order by name
N-
In reverse alphabetic order by name (Z through A)
E
In alphabetic order by extension
E-
In reverse alphabetic order by extension (Z through A)
D
By date and time, earliest first
D-
By date and time, latest first
S
By size, smallest first
S-
By size, largest first
/B
Restarts your computer after files have been reorganized.
/SKIPHIGH
Loads DEFRAG into conventional memory. By default, DEFRAG is loaded into
upper memory, if upper memory is available.
/LCD
Starts DEFRAG using an LCD color scheme.
/BW
Starts DEFRAG using a black and white color scheme.
/G0
Disables the graphic mouse and graphic character set.
/H
Moves hidden files.
♦