Microsoft DOS Defrag command
Quick links
About Defrag
Availability
Defrag syntax
Examples
About Defrag
Microsoft Defrag was first introduced with MS-DOS 6.0 and is a software utility capable of organizing the files on the hard drive.
Availability
The scandisk command is an external command that is available in the below Microsoft operating systems.
MS-DOS 6.0 and above
Defrag syntax
Below is a listing of available switches in MS-DOS Defrag 6.0 and above. It is important to note that these commands will not work in Windows 95 and above and defrag should never be ran while Windows is running in the background.
defrag Drive: /F /U /S:order /B /Skiphigh /LCD /BW /G0 /A /H
| Drive: |
Drive letter that you wish to defragment. |
| /F |
Insures that no empty space remains between files. |
| /U |
Leaves empty space if any is found between files. |
| /S:order |
Sorts files in specific sort <order>.
N = Alphabetic name order.
-N = Reverse alphabetic name order.
E = In alphabetic file extension order.
-E = Reverse alphabetic file extension order.
D = In date order (earliest to latest).
-D = Reverse date order (old to new).
S = By file size (small to large)
-S = By file size (large to small) |
| /B |
Reboot computer after completing defrag. |
| /Skiphigh |
Load defrag into conventional memory. |
| /LCD |
Start defrag in LCD color mode. |
| /BW |
Start defrag in black and white color mode. |
| /G0 |
Disable mouse and character set. |
| /A |
Start defrag in automatic mode. |
| /H |
Move hidden files. |
Examples
defrag c:
Defrag the main hard drive and correct any fragmented files. |