Scheduling Disk Defrags


By Dan DiNicolo, April 16th, 2007 Posted in Computer Hardware. Subscribe to our RSS Feed



Rather Have Fast and Secure Remote Control?

 Securely access PCs and servers worldwide through any firewall. Try it and see for yourself!

Use Windows XP’s defrag.exe command-line utility to automate defrags with a batch file:

Step 1: Open Notepad. On the first line of the, type defrag.exe [drive letter]: -f. The script in this example will force a defragment of drive C. If you only wanted to analyse the disk, you could use the –a switch instead.

Step 2: Save the file as defrag.txt to the location of your choice. Once saved, browse to that directory and rename the file to defrag.bat. If you are not prompted with a message about changing the file extension, you will need to make extensions visible in Folder Options.

Step 3: Test the new script by double-clicking on it. A window will appear as shown above. If you don’t want to complete the defragmentation process at this time, press Ctrl +C to cancel the process.

Step 4: To schedule the script, click Start, All Programs, Accessories, System Tools, and click Scheduled Tasks. The Scheduled Tasks window will open. Double-click the Add Scheduled Task icon to launch the wizard.

Step 5: Click Next, and then click the Browse button. Browse to the location of defrag.bat, select it, and click OK. Select the interval at which defrags should occur, for example Monthly, and click Next. Select time and day settings, and click Next.

Step 6: Scheduled Tasks need to run as a user. Your username will probably already be populated, so enter your password and confirm it. Click Next. Click Finish. Then sit back, relax, and wait for your defrag to occur according to the schedule you set out.

Written by Dan DiNicolo - Visit Website

Print This Post Print This Post













All Tutorials by Category:















Entire site Copyright © 1999-2007 2000Trainers.com, all rights reserved.
Content on this site may not be copied or reproduced in any way without permission.





IT Showcase


Text Link Ads

View all Tutorials by Category: