Were all familiar with fragmented hard disk and how it can slow a computer down to a snail. The time it takes for Windows to fully defrag your system is unbearable because it various upon computer speed, hard disk size and how fragmented the hard disk has become.
Worst of all, the built in utility can only defragment a single hard drive at a time. This can range from 30 minutes to several hours and who wants to sit there and wait especially if you have multiple drives to defrag. Fortunately the Windows Defragmenter utility is accessible from the command line which we can use and create a batch file to defrag multiple drives.

Start by opening ‘NOTEPAD’ to create a batch file for the commands to defrag multiple drives. For each drive that is to be defragmented, type: ‘ defrag x: -f ‘. Replace X with your drive letter. For example if we wanted to defrag drives A:\ , B:\ , and C:\ we would type these four lines in ‘NOTEPAD’. ‘ CD\ ‘ is to return to the root directory.
cd\
defrag a: -f
defrag b: -f
defraf c: -f
Now save the file however remember to save it as a batch file by adding ‘.bat’ extension after the file name and change the SAVE AS TYPE to ‘ALL FILES (*.*)’ otherwise it will not work. For example

Now just double click on the batch file and allow it defrag all three drives in sequence. You can also add into ‘SCHEDULE TASK’Â and allow it launch automatically at a specify time.
Enjoy…
It is quite a pain to defrag with the Windows defragger. I now run an automatic real time defragmenter which also prevents fragmentation from occuring (upto 85% it says). It runs unintrusively in the background and is very efficient.
I truly agree, windows defrag utility really sucks. For years I’ve been using UltraDefrag. It’s serve me well and best of all its FREE
. Great tip though