Defragmenting a hard drive is important to the stability and speed of a computer, but it takes a long time to do and you have to remember to do it. You can buy programs to do it for you, but why pay for it when Windows XP will do it for you for free?

Step 1: Go to Scheduled Tasks

First, you need to go to Start>All Programs>Accessories>System Tools>Scheduled Tasks

Step 2: Add a Task

Next, double click on "Add Scheduled Task."

Step 3: Whatever You Want

Then, click "Next" and click on whatever program you want. It isn't important what you choose because we will have to change it later. Click next and enter the title, time, day and frequency of this task. Then it will ask for your password, I read somewhere that you need a windows password for this to work but I'm not sure if this is true.

Step 4: Almost Done

After you have entered your password and clicked next it will say "You have successfully scheduled the following..." On this screen make sure you check the checkbox that says "Open advanced properties for this task when I click Finish." Then click "Finish."

Step 5: Last Step

Finally, change the "Run:" textbox to say "defrag c:" and click "OK." Now when it runs the task it will run "defrag c:" and it will defrag your C drive.

Step 6: Comments

This is my first instructable so please be kind with your comments, but also please be constructive. Thanks!
I didn't know you could do that. Awesome!! Saves me having to do it.
thanks much.. never new about that!
I love this instructible...my friend never heard of this untill today when i said he needed to do this...this would be perfect for him
Yes, very good Instructable, good use of graphics to highlight and assist the reviewer. However I will disagree with you on a certain point. Where I agree Defrag is an important tool, it is obvious from your screenshot in the introduction that your root drive didn't really need defragging ( but I understand that is was for an example so not to worry) My work laptop has data flowing on and off it as I do a lot of SQL work and I very rarely defrag it, possibly every two months, if that. Modern Operating Systems are very forgiving and we have massive file systems and RAM. About 16 years ago we were using 4 Mb of RAM and 100Mb hard drives, that was when defragging was important. Having said that, I suggest that you do this scheduled task while you are away, possibly at night so it does take up system resources and your time. Good luck, keep 'em coming
Yeah, I don't defrag much, maybe once or twice a year, but that's only after I defraged my drives in the first place. (I have used drives from other people's computers that I take off the street, unfortunately only 42 gigs worth.) Apparently, not many people know what defragging is (excluding most of us here on instructables) So yeah, It's pretty important.
I haven't defraged in about 5 years. thats when I dumped windows for linux which uses intelegent filesystems that don't get fragmented in the first place. :)
Wait another 16 years. In retrospect, today's "massive" will seem as quaint as 4mb of RAM.
Thanks! Yes, the screenshot showed that my drive did not need defragging because it does it automatically once a week. That may be excessive but I figure that it doesn't hurt. Thanks for the tips!
A couple of things 1 - defraging is VERY important to PC performance. 2 - Operation Visine - get the red out. If you see red, then defrag. 3 - start+run+defrag c: -f is much simpler way defraging the HD. 4 - defrag c: -f is much easier to schedule.
How to automatically defrag: 1. Buy a Mac. 2. Nothing.
Much more easy:<br/><br/>Use JKDefrag, it has a &quot;screensaver version&quot;, so it keeps your disks defragmented<br/><br/>Get it here<br/><a rel="nofollow" href="http://www.kessels.com/JkDefrag/">http://www.kessels.com/JkDefrag/</a><br/><br/><em>Free (released under the GNU General Public License) disk defragment and optimize utility for Windows 2000/2003/XP/Vista/X64. Completely automatic and very easy to use, fast, low overhead, with two optimization strategies, and can handle floppies and USB disks/sticks. Included are a Windows version, a commandline version (for scheduling by the task scheduler or for use from administrator scripts), a screensaver version, a DLL library (for use from programming languages), and versions for Windows X64. </em><br/>
Hey Imnop! What window xp theme you running?
I am using the Zune theme from <br/><a rel="nofollow" href="http://www.zune.net/en-us/meetzune/software.htm">http://www.zune.net/en-us/meetzune/software.htm</a><br/>(halfway down the page)<br/>
What exactly does defraging do?
This link tells what fragmentation is<br/><a rel="nofollow" href="http://www.webopedia.com/TERM/F/fragmentation.html">http://www.webopedia.com/TERM/F/fragmentation.html</a><br/>
defrag take too much time...what if the hard disc is huge say 1 terabyte? is there any better tool?
That is what is good about this method, as Jezza Bear pointed out you can set the task to run at night or sometime when you are not using your computer.
Very useful! What exactly are unmovable files though. They seem to be quite movable. And... How did you change the window color? The WMCenter standard is blue, and yours is black.
The Page File and MFT is not movable during normal operation. However, it can be defragged/moved on boot - but I don't think the software bundled with windows will do that.
Very clear and easy to follow well done
im confused expainl
What are you confused about?

About This Instructable




More by lmnop:Automatically Defrag 
Add instructable to: