/ Sign-up

Schedule and Speed up Defragment Process

1 solved thread

This Tutorial addresses:
  • Speed
  • Hard Drives

On regular use of system, Windows randomly saves data and then randomly deletes them as required. This random access of the storage media and read/ write process fragments the large data files before storing it in the hard drive. Fragmentation slows the read/ write performance of the hard drive because the data is not well organized, and the system needs to assemble the fragments to provide the required data as a complete information.

The optimum speed of data access may be recovered if the hard drive is defragmented on a regular basis. Defragmentation places the fragmented files scattered in distant clusters of the hard drive in the contiguous clusters, hence making it easier for the read/write heads of the hard drive to gather the needed information almost instantaneously.

Speed up defragmentation:

Windows 7 has built-in defragmentation feature which is by default scheduled to be executed every week. However, since the process is set as low priority, it gets interrupted or stops altogether in case any high priority process or application is already running in the background, or is initialized at the time of defragment process.

Therefore, in order to perform the defragmentation process with high priority, a batch file with appropriate parameters can be created executed at the specific times.

Schedule defragmentation:

As discussed above, running other applications or accessing other files may hamper the defragmentation process. To avoid this, the process is scheduled. This can be done by creating a batch file with specific parameters that set the priority level of the defragmentation process to normal, hence allowing Windows to perform the task without interruptions, and using the Windows Task Scheduler to schedule the execution of the batch file.

Creating a batch file:

  1. Open Notepad.
  2. Write command Defrag “C:” /H. (C: drive is to be defragmented using this batch file. Also, /H parameter is used to set defragmentation process priority level to normal.

  3. Save the file as ‘Defrag.bat’ to make it as batch file. (You can use any name for the file but the extension must be .BAT whatsoever).

  • Scheduling defragmentation:

    1. Click the Start button.
    2. At the bottom of the Start menu, in the search box, type Task Scheduler and hit Enter key.
    3. On the opened window, from the Actions pane in the right, click Create Basic Task.

    4. On the window that appears next, provide a name to the task in the Name field.
    5. In the Description field type a brief description for the task.
    6. Click Next to continue.

    7. On the Trigger Task window, click to select the radio button as required. (Daily for this demonstration).
    8. Click Next to proceed.

    9. On the next window, specify the date and time when the task should be executed along with the recurring period.
    10. Click Next to continue.

    11. On the Action window, click to select Start a program.
    12. Click Next.

    13. On the next window, click Browse to locate the ‘Defrag.bat’ file that is to be executed.
    14. Click Next when done.

    15. On the Summary window, click Finish to create the task and to execute the batch file as per the scheduled time.

    Can't find your answer ? Ask !