Saturday, January 30, 2016

command-Line Parameters for Defrag.exe in Windows 2008





SwitchDescription
/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.
/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.

Defrag Files Large Than 64 MB


/WPerforms full defragmentation. Attempts to consolidate all file
fragments, regardless of their size.

in 2008 this switch has been deprecated

Undocumented switch : B

Use B instead of /W  

Defragment all your drives at once

Would you like to just defragment all of your drives without getting extra info or doing a more complicated defrag?  If so, just enter defrag /C and let defrag take over.  Or, hey, you could just do this from the main defrag window since it works the exact same.

Other Nice Options

Get more info about the defrag:/V
Consolidate free space on a drive:/X
Defrag at normal process priority:/H
Track a defrag already in progress:/T
Defrag all drives except the one listed:/E
Defrag all drives at the same time:/M – note, this is only advisable if you have multiple drives, and will not work good on a computer with multiple partitions
You can put the options you need together, too.  Say you want to defrag all of your devices in verbose mode to see more info, and you also want the defrag to run at top priority.  To do this, we’ll enter:
defrag /C /H /V

No comments:

Post a Comment