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

Several new switches or parameters are added to the defragmentation console tool (defrag.exe) in Windows 7. The switches are /E, /H, /M, /T, /U & /X. Here is the entire list of parameters supported by defrag.exe (v6.1) in Windows 7:

/APerform analysis on the specified volumes.
/CPerform the operation on all volumes.
/EPerform the operation on all volumes except those specified.
/HRun the operation at normal priority (default is low).
/MRun the operation on each volume in parallel in the background.
/TTrack an operation already in progress on the specified volume.
/UPrint the progress of the operation on the screen.
/VPrint verbose output containing the fragmentation statistics.
/XPerform free space consolidation on the specified volumes.

Likewise, the following switches are dropped in Windows 7.  Although the following switches are not listed when running "defrag.exe /?", Defrag.exe in Windows 7 still accepts these switches. It’s not clear if they’re left for backward compatibility. Perhaps we should wait for official note from Microsoft.

/RPerforms partial defragmentation (default). Attempts to
consolidate only fragments smaller than 64 megabytes (MB).
/WPerforms full defragmentation. Attempts to consolidate all file
fragments, regardless of their size.
/FForces defragmentation of the volume when free space is low.

Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner


  1. Annoyed At Kno-It-Alls
    said this on Thursday, January 26th 2012 1:10 am

    So the basis for making the /w switch useless ONLY applies if you use scheduled automatic defragmentation? I love how Microsoft is forcing, without saying they are forcing, their own policies upon us. Kinda like how we its ‘recommended’ to disbale firewall and AnvtiVirus before updating… Yea, like the in house servers do that!

    Its really getting annoying the presumptions this new development is taking. Admins that ‘know everything’ and that decide whats best for systems they have nothing to do with. Lets not eeven get into why we cant update using https://, even if we buy the premium versions.

  2. said this on Sunday, March 21st 2010 8:03 am

    There seems to be an undocumented “/b” switch, which defrags the boot files.

  3. said this on Saturday, December 5th 2009 9:40 am

    Thanks, Daniel. Thought they were left for backward compatibility. Thanks for the confirmation :)

  4. Daniel Martín
    said this on Saturday, December 5th 2009 5:26 am

    Yes, Ramesh. The /r, /w and /f switches are deprecated. Windows 7 still accepts them for backward compatibility but they don’t do anything.

Leave a Reply