New Command-Line Parameters for Defrag.exe in Windows 7

by Eric Geier [Published on 14 April 2011 / Last Updated on 1 Feb. 2010]

See the exisitng, new, and hidden switches for the Defragmenter.

In Windows 7, you’ll find several new parameters for the defragmentation tool (defrag.exe) you can use at the Command Prompt, which include the following:

  • /E: Perform the operation on all volumes except those specified.
  • /H: Run the operation at normal priority (default is low).
  • /M: Run the operation on each volume in parallel in the background.
  • /T: Track an operation already in progress on the specified volume.
  • /U: Print the progress of the operation on the screen.
  • /X: Perform free space consolidation on the specified volumes.

The following are additional parameters that existed in earlier Windows editions and are listed by defrag help:

  • /A: Perform analysis on the specified volumes.
  • /C: Perform the operation on all volumes.
  • /V: Print verbose output containing the fragmentation statistics.

Here are parameters that previously existed but aren’t listed by defrag help, though still work:

  • /R: Performs partial defragmentation (default). Attempts to consolidate only fragments smaller than 64 megabytes (MB).
  • /W: Performs full defragmentation. Attempts to consolidate all file fragments, regardless of their size.
  • /F: Forces defragmentation of the volume when free space is low.

See Also

The Author — Eric Geier

Eric Geier (Dayton, Ohio) is a Freelance  Tech Writer and Author specializing in computer networking. He's also the Founder and Owner of NoWiresSecurity, which provides a hosted cloud-based RADIUS service to help businesses easily secure their Wi-Fi networks with the Enterprise (802.1X) mode of WPA/WPA2 security. He’s also the Founder and Owner of On Spot Techs, which provides on-site computer and technology services.

Featured Links