Windows Vista defrag switches…
How do I defrag in Windows Vista?
You can’t see or use all the best features unless you run it from the command line.
Some swtiches that are available from the command line for Disk Defragmenter are:
-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
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
Here are a few other examples:
defrag d:
defrag d:’vol’mountpoint -w -f
defrag d: -a -v