
In the new version of Disk Defregmenter, the user interface doesn’t allow users to select only one of their partitions for defragmentation. You can defragment all of your partitions at once, or none at all. This is pretty lame if you ask me, and kind of pointless, since you don’t always need to defragment all of your partitions.
You can however run a defrag from the command prompt and use the appropriate command line parameters to obtain the results you want.
You need to run the Command Prompt as an Administrator. The easiest way to do this is by clicking Start, and typing Command in the search box. This will show you the Command Prompt icon in the menu. Right click on the Command Prompt icon, and click Run as Administrator.
Once the Command Prompt is started, type “defrag” or “defrag.exe” plus the appropriate parameters and Disk Defragmenter will defragment or analyze the partition you want.
The list of supported command line parameters for “defrag.exe” is the following:
* drive letter - this parameter specifies the drive letter or the mount point path of the volume that will be analyzed or defragmented. (e.g. “defrag c:” or “defrag e:\volume\mountpoint”);
* -c - using this parameters forces “defrag.exe” to defragment all volumes on your computer. (e.g. “defrag -c”);
* -a - performs only fragmentation analysis and it doesn’t defragment the specified drive. (e.g. “defrag d: -a”);
* -r - performs a partial defragmentation which consolidates only the fragments which are smaller than 64 MB. This is the default setting. This means that “defrag v:” and “defrag v: -r” are equivalent and the Disk Defragmenter will perform the same type of defragmentation;
* -w - when you use this switch, “defrag.exe” will perform a full defragmentation, regardless of the fragments size. (e.g. “defrag c: -w”);
* -f - forces the defragmentation even if the free space is lower than 15%. (e.g. “defrag c: -f”);
* -v - verbose mode. In this mode, “defrag.exe” will show a detailed analysis and defragmentation output. (e.g. “defrag d: -v”);
* -? - displays help information about how to use “defrag.exe”. (e.g. “defrag -?”).
The switches can be combined to obtain the desired result. You just need to respect the following syntax:
defrag volume -a [-v]
defrag volume [{-r | -w}] [-f] [-v]
defrag -c [{-r | -w}] [-f] [-v]
Here are some examples, to help you understand better:
* defrag –c –w –f –v - defragments all you hard drives and all files regardless of files & fragments size, even if there is less than 15% of hard drive space left and shows a detailed analysis and defragmentation report;
* defrag d: -w -f - makes a full defragmentation of your “D:” drive, even if the space available is lower than 15%.
Check out my other article if you’d rather schedule automatic defrags using Disk Defragmenter.
If you would like to make a comment, please fill out the form below.