How to Defrag Multiple Drives (Partitions) at once in Windows XP
The Disk Defragment utility in Windows XP does not support to defragment multiple drives at the same time. We can do the same by creating a batch file to defragment multiple of the drives, one after the other. Create a file named defrag.bat (Opened notepad and save as the file with file name .bat as extension) and save it where you like. If you wannna to run it from the command line, you could save it in the C:\Windows directory so that it can be available in the system path. For example, if your hard drive is partitioned in three drives (C:, D:, E:) please add these three lines in the batch file and run the batch file to degrag all the drives at once.
defrag c: -f
defrag d: -f
defrag f: -f
You may run the batch file by double clicking it or run it from the command prompt.










Comment by Zakharov on 27 December 2007:
These are the hassles of manual and scheduled defragging- you need to create batch files, execute them at the time your PC is free etc. Quite a headache if you have 4 drives like I do. Instead, with an automatic defragmenter, you can let the defragger run and intelligently and automatically defrag the drives in the background whenever the PC has enough free resources. Far more convenient and efficient than waiting around for 4 huge drives to be defragmented on a schedule.
Comment by Houston Home on 30 December 2007:
This information is very helpful to me. Thank you for sharing.
Comment by Karl on 1 January 2008:
I’m not sure about this as I heard you can do this as well. However, I’m just a little skeptical whether this slow down performance considerably when multiple drives are being defragmented at the same time.
Comment by ashok on 17 January 2008:
Hi,
Amazing Tips for defrage multiple drives at one time. I liked you blog very much and i have read may posts. All are informative and good. Thanks for the tips
Comment by Data Recovery Blog on 6 February 2008:
It is good to use the defrag tool regularly, but may prove fatal when in between defrag process power goes off or system shuts down. This may cause serious damages and might also cause permanent data loss.
Comment by Sunieet on 8 February 2008:
@ Data Recovery Blog,
Yes buddy, you are right… so it is recommended to always perform the HDD Deframentation when the system is connected to AC Power Supply via a UPS…
Thnx
Comment by reviewlutions on 15 March 2008:
defrag… mmm always do that steps on my old wins ME in order to refresh my system and make it faster to load, but since I move to XP, never thinking about it before… should I try it again…?
Comment by Beecher Bowers on 7 April 2008:
Another good (free) option for defragmenting is PowerDefrag/contig. Contig is a free sysinternals tool and PowerDefrag is a GUI interface for it.