Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sheduling defragmentation of a drive 1

Status
Not open for further replies.

Roaders

Programmer
Aug 5, 2001
38
0
0
GB
Hi

I have three drives, C,D and G and I want to schedule c and d to defrag every night that I leave my computer on. I can get it to work through the command line with defrag but this does not seem to work with the sheduler, I would also like to see the defragmenter running. I have also tried with dfrg.msc in the system32 directory but I do not know how to tel it which drive to defrag.

Any help much appreciated.

Thanks

Giles Roadnight
Giles Roadnight
messenger: giles_roadnight@hotmail.com
ICQ: 81621370
 
Roaders,

I've found the best solution for defraging to be "Diskeeper" from Executive Software. You can schedule any drive for any time or do like I do and have it run continually in the background. It's very inexpensive too!
Download a trial here:
 
Doug has a VBS Script which might help you out. Follow the links on his site under XP Fixes. You may have to tweak it a bit if you only want 2 out of 3 drives done.

Option #1:
defrag_all.vbs - Defrag All Hard Drives - Can be run as a scheduled task
Does not create an error log
© Doug Knox - rev 03/29/2002
This code may be freely distributed/modified.

Your antivirus software may report this script as potentially malicious, or a possible virus. This is because the script writes to the System Registry.

Usage: Download defrag_all.vbs and save this file to your hard drive. Navigate to where you saved it and double click the file. This script will execute the Defrag command for every hard drive it finds on your system. You can also run this script as a Scheduled Task.

defrag_all2.vbs - Defrag All Hard Drives - Can be run as a scheduled task
Creates an error log and displays the error log when complete.
© Doug Knox - 4/13/2002
This code may be freely distributed/modified.

Usage: Download defrag_all2.vbs and save this file to your hard drive. Navigate to where you saved it and double click the file. This script will execute the Defrag command for every hard drive it finds on your system. It will also create an error log in the root directory of the first fixed disk it finds (usually C:), and displays the log when finished. You can also run this script as a Scheduled Task.

This page last updated 07/24/2002 03:25
All material © 2002 - Doug Knox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top