Wednesday, August 02, 2006

Windows XP: Scheduling Disk Defragmentation

You should consider running the Disk Defragmenter utility on a regular basis to keep your system running efficiently. If you don't know what disk fragmentation is, it's when parts of a file get scattered over the hard drive over time, which in theory will take longer for them to be retrieved when they're requested by the file system.

The Disk Defragmenter utility re-organizes the files on the drive in a more linear order so that they can be accessed more quickly. Although running this utility can take a long time to complete. There should also be no other programs executing while this process is happening.

To have this utility run automatically, you can use the Windows Task Scheduler to run this program at a time when the computer is not going to be in use.

To schedule this program to run as a task follow the instructions below:
  • Under the Start menu, open the 'Control Panel' folder (or select 'All Programs | Accessories | System Tools | Scheduled Tasks')
  • Double-click the 'Scheduled Tasks' applet.
  • Double-click the 'Add Scheduled Task' icon.
  • Right-click the folder, and select 'New > Scheduled Task'
  • Click on the icon that says 'New Task', and press F2, then give the icon a name like "Defragment Disk" and press Enter.
  • Double-click the icon, it will open up the task dialog window.
  • In the Run field, type "defrag.exe c: -v".
  • In the 'Start in' field, type "C:\".
  • In the 'Run as' field, enter a user account (i.e. ComputerName\UserName) with administrator access. Press the 'Set password' button, and enter a password for the account.
  • Click the Schedule tab to select the time and date(s) to want to run the task.
  • Press the OK button when done.

No comments: