

Disk Defragment Windows Vista from the Command Line
The Windows Vista Disk Defragmenter has been improved over the Windows XP version, but you can’t see or use all the best features unless you run it from the command line. By default the defrag tool only defragments files smaller than 64 MB, because according to Microsoft’s benchmarks, fragments of this size, which already consist of at least 16000 contiguous clusters, have a negligible impact on performance. If you still want to defrag files larger than 64 MB too, you need to use the -w switch mentioned below to defragment files of all size.
Disk Defragmenter does not defragment files in the Recycle Bin, or files which are in use. Disk Defragmenter will not degragment Bootsect dos, Safeboot fs, Safeboot csv, Safeboot rsv, Hiberfil sys, Memory dmp, or the Windows page file. Using the -b parameter will optimize these boot files.
Some swtiches that are available from the command line for Disk Defragmenter are: <volume>Specifies the drive letter or mount point path of the volume to be defragmented or analyzed. -c Defragments all volumes on this computer. Don’t specify a drive letter while using this. -a Performs fragmentation analysis only. -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, even 64 MB files. -f Forces defragmentation of the volume when free space is low. A volume must have at least 15 % free space before Disk Defragmenter can completely defragment it. -i This makes Defrag run in the background, and operate only if the computer is idle, like when run as a scheduled task. -b Optimizes boot files and applications only. Use this option during a separate defrag operation. -v Specifies verbose mode. The defragmentation and analysis output is more detailed.
The only indication you will get is a blinking cursor. This means that the process is going. To interrupt the defragmentation process, press Ctrl + C in the command window.
If you find that you are unable to defragment or cannot run the defragment utility in Vista or that a drive or volume has been marked by Vista as having errors, run chdsk by entering:
chkdsk c: /f
… at a command prompt; where c is the drive letter. You will be able to then run Defrag after Chkdsk has repaired the file system.
To run you will need to run the command line prompt as the Administrator. If you’re not sure how to open a command line, or open it as an Administrator click here.
To defrag you boot files enter into the command line:
defrag c: -b
To defrag all files on all drives/volumes, even the files over 64 MB enter into the command line:
defrag -cwv
This may take a while, but you’ll see a report for each drive. The cursor will blink until finished, then it will return to the command prompt.

Here are a few other examples:
defrag d:
defrag d:’vol’mountpoint -w -f
defrag d: -a -v
You could use the command line once a week, or even once a month, in addition to daily default defragmenting to keep your computer running faster.



Use Disk Defragmenter to Speed Up Your Computer
Windows Vista, like Windows XP, comes with a free Disk Defragmenter. Defragmenting the hard drive on your computer makes it faster by organizing the files that have been spread (fragmented) across the disk closer together to allow them to be found and used quicker. It’s best to set the Disk Defragmenter on a schedule so you don’t have to worry about doing it yourself.
To open Disk Defragmenter go to Start –> All Programs –> Accessories –> System Tools –> Disk Defragmenter
Click Modify schedule.

To optimize the speed you’ll get from using the Disk Defragmenter, schedule it to run at least once a day when you are not using your computer. System performance can slow down while the Disk Defragmenter is running.

You may or may not notice a big difference if you’re hard drive is not heavily fragmented right now, but Disk Defragmenter will keep everything organized so you’ll never see that slow down caused by heavy fragmentation.
There are a few free, and better defragmenter programs such as Power Defragmenter, and Auslogics Disk Defrag, but the best on the market is Diskeeper, which was hired by Microsoft to develop the first Windows defrag program, plus Diskeeper can do some very special tasks like organizing the MFT (Master File Table) to get your disk completely reorganized. Diskeeper has a 30 day trial, but it cost money to use it after that. The free Disk Defragmenter that comes with Windows will meet most everyone’s needs.
Latest comments by:
- kilnos
A clean drive thats not fragmented will be faster in responding to tasks. Being the slowest link in the data ...
© Copyright Nerd Grind 2009. All rights reserved.
