Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Microsoft DOS Defrag command

Quick links

About Defrag
Availability
Defrag syntax
Examples
Extended Information

About Defrag

Microsoft Defrag was first introduced with MS-DOS 6.0 and is a a software utility capable of organizing the files on the hard disk drive.

Availability

The scandisk command is an external command that is available in the below Microsoft operating systems.

MS-DOS 6.0 and above

Users looking for steps on how to run Defrag in Windows and not from the command line should see document CH001126.

Index

Category:
MS-DOS

Companies:
Microsoft

Related Pages:
Defrag help

Resolved

Were you able to locate the answer to your questions?

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.
/FInsures that no empty space remains between files.
/ULeaves empty space if any is found between files.
/S:orderSorts 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)
/BReboot computer after completing defrag.
/SkiphighLoad defrag into conventional memory.
/LCDStart defrag in LCD color mode.
/BWStart defrag in black and white color mode.
/G0Disable mouse and character set.
/AStart defrag in automatic mode.
/HMove hidden files.

Examples

defrag c:

Defrag the main hard disk drive and correct any fragmented files.

 

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope