Note: All stuff posted here, is for the educational purpose only. If anyone misuses the info, the management of the OFF Club can not be held responsible and shall stand withdrawn from any damages which may arise as a result of mishandling of the info; hence it is advised to use them at your own risks and cost. Thanks for your patience and cooperation.

Monday, November 12, 2007

Defrag Multiple Hard Drives At Once In Windows XP

As you would know its a painful process to defragment all hard drives at the same time in Windows XP, as the Disk Defragment utility in Windows XP doesn’t have any option to defrag all the drives at once.

But a simple batch file trick can get over this problem and defragment all of the drives, one after the other.

The disk defrag utility in Windows XP can be called from the command line with the following syntax:

Windows Disk Defragmenter

Copyright (c) 2001 Microsoft Corp. and Executive Software International, Inc.


defrag [-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

To make Windows defrag all the drive at once we need to create file named defrag.bat [you can have any name, even yours :) ] . Now for each hard drive, assign a line to the batch file. For instance, if we want to defragment drives C: , D: , F: and G: we will add these three lines:

defrag c: -f
defrag d: -f
defrag f: -f
defrag g: -f

Now to defrag at once, just either double-click on the batch file or start it from the command line.

If you enjoyed this post, make sure you subscribe to my regular Email Updates!

0 Feed Back:

Add to Technorati Favorites Best Free Domains ll About Orkut. Orkut JavaScripts,Tips & Tricks, Tricks Related To Computers, News, Entertainment And Plenty More. Loads of stuff would be sufficient to fill your appetite

Thanks For Visiting The Site | ۩ Orkut Fun n' Fan Club™ Owned By Orkut Offcial Community