Batch File tutorials
Defrag Multiple Hard Drives At Once
So you want to defrag all your drives at the same time? Windows XP does not provide you with a way to do this so I'm going to show you how you can! Don't worry it will only take you a few minutes and I'll show you in very easy steps.
The best thing is that after writing this very small program you will never know how you lived without it, more so if you have loads of hard drives.
In simple terms you are going to create a very small batch file to that you can easily double click on to defragment all your drives at once!
Step One
Click 'Start' and then Click 'Run' Or Hold down your 'windows key' and press 'R'
Step Two
Type Notepad into the dialog box and click 'OK'
Step Three
Below are the defragment options that are available to you, don't worry if you don't understand them all as I've only placed them here just in case you are a bit technical and would like to do more!
Step Four
Type defrag c: -f into the Notepad as displayed below
Step Five
Now for your additional drives you will just enter the same except you will change c: to what ever letters your other drives are, see below for an example.
Step Six
So you see all you have to do is add a line for each drive with its own letter, simple! well I did say that it would be.
Step Seven
Click on File and Save as.
Step Eight
Make sure you change the "Save Type as" to All files as below.
Step Nine
Name the file DefragAll.bat and Click save
Make sure you know where you are saving to!
Step Ten
The file you have saved will look like the image below.
That's it!
OK you are now done all you have to do now is Double Click the DefragAll file and the program will start! That's all there is to it!
Set this batch file to auto-run (Scheduled Task)
Turn DefragAll.bat into a Run Command
Back to Adam's Tutorials