So many of us these days have multiple hardrives. Did you know you could defrag all of them at one time!
In Windows XP, its Disk Defragmenter Utility is unable to defrag all hard drives at the same time. Thus, it is of much inconvenience when you have more than one hard drive in your PC. To do this, a method of creating a batch file to defrag all of the drives one after another shall be used.
The Disk Defragmenter Utility in Windows XP can be generated from the command line with the following syntax:
Windows Disk Defragmenter
Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.
Usage:
defrag <volume> [-a] [-f] [-v] [-?]
volume drive letter or mount point (d: or d:volmountpoint)
-a Analyze only
-f Force defragmentation even if free space is low
-v Verbose output
-? Display this help text
The first step is to create a file named defragall.bat, and to place it anywhere for your convenience and easy access. Furthermore, to run it from the command line, it can also be placed in the Windows directory so that it will be available in the system path.
Second, for each hard drive, you need to add a line onto the batch file. For instance, if you want to defrag drives C:, D:, and F:, you will add these three lines:
defrag c: -f
defrag d: -f
defrag f: -f
To run the defragment, you may double-click the batch file or start from the command line.