DEFRAG: Defragmenting the System Drive

In Chapter 25, you learned how to defragment a volume using Windows 8’s Disk Defragmenter program. If you want to schedule a defragment or perform this chore from a batch file, you have to use the DEFRAG command-line tool. Here’s the syntax:

DEFRAG disks [task(s)] [/A] [/C] [/E] [/F] [/H] [/M] [/O] [/R] [/T] [/U] [/V]

disks

Specifies the drive letter (followed by a colon) of each disk you want to defragment (separate multiple drives with a space).

task(s)

As this book went to press, Microsoft had not provided any information on this new parameter.

/A

Tells DEFRAG only to analyze the disk.

/C

Tells DEFRAG to defragment all the system’s drives.

/D

Tells DEFRAG to run a traditional optimization (that is, one ...

Get Windows 8 In Depth now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.