By defragmenting your computer, you can speed up its performance by rearranging and taking advantage of the extra space of your computer's hard drive. Computers with newer operating systems such as Mac OS X and Windows 8 defrag the computer automatically, while older operating systems such as Windows XP require you to defrag manually. Follow the steps below to learn how to manually defrag your computer, or to change the schedule to defrag automatically.
Step
Method 1 of 2: Defrag on Windows 7 and Windows 8

Step 1. Click the "Start" menu, then select "All Programs. "

Step 2. Open "Accessories", then click "System Tools"

Step 3. Select Disk Defragmenter. "

Step 4. Highlight the drive you want to defrag process with
For example, if you want to defrag your computer's primary hard drive, highlight "(C:)."

Step 5. Click "Analyze Disk. " The computer will analyze the driver to determine whether the defrag process is recommended to run at this time.

Step 6. Click "Defragment Disk" if the computer instructs you to proceed with the defrag process manually

Step 7. Wait for the computer to finish going through the defrag process
The defrag process can take from a few minutes to several hours to complete, depending on the state of your drive.

Step 8. Click "Turn on schedule" when the defrag process is no longer running

Step 9. Make sure that a check mark appears next to "Run on a schedule"

Step 10. Determine the frequency, date, and time that you want your computer to defrag automatically from now onwards

Step 11. Click "OK," then click the button labeled "Close. " The computer will exit the Disk Defragmenter, and the defrag process will run on the computer automatically according to the frequency, date, and time you have specified.
Method 2 of 2: Defrag in Windows XP

Step 1. Click "Start", then click "My Computer"

Step 2. Hover over "Local Disk", then right click and select "Properties" from the hovering menu

Step 3. Click the "Tools" tab, then click "Defragment Now"
Disk Defragmenter will open on the desktop.
Step 4. Select the drivers to be defragmented', then click "Analyze". The computer will analyze the files and folders on the drive to determine if the drive needs to be defragmented.


Step 5. Click "Defragment"
The computer may take a few minutes or several hours to defrag the drive, depending on the state of your computer.

Step 6. Click "Close" to exit Disk Defragmenter
Tips
For Windows Vista users, the computer will run the defrag process automatically every week. If you want to change the time or date that Disk Defragmenter runs in Windows Vista, change the schedule by following the steps listed in this article under "How To: Defrag in Windows 7 and Windows 8."
Warning
- If the computer does not start at the scheduled time to run the defrag process, the computer will not run Disk Defragmenter. Make sure that you leave the computer on on a predetermined schedule so that the computer can perform the defrag process automatically.
- If the computer is located in a domain, you may need to enter an administrator password to run Disk Defragmenter. Discuss this with the domain's network administrator to obtain the password needed to run the defrag process manually.