Discussion Locked

Pc Maintenance

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to write a script to defragment a pc and other simple task but i do not know how to start.

4 replies

by sgt_shultz

well you probably can't afford it but that Diskeeper is worth the money...and bet their website has info on scripting it...maybe you could get some clues there for scripting what's built into windows 2000

by jpcandiff

Use notepad to write a simple batch file and use the defrag command line parameters(http://support.microsoft.com/?kbid=155326) to automate the task.

Example of a simeple batch file:

Run Defrag.exe /noprompt

save the file with a .bat extension.

This can be ran by either putting it in startup, config.sys, or used in conjunction with policies.

by remus

Alot of it depends on your OS as well. Unfortunately, Win2K does not have the option of natively using command line to run Defrag. However, you can download "AutoDefrag" from this site and use it to schedule the defrag. http://www.morphasys.com/autodefrag/. Look at the instructions for using the AT command to schedule it as well. BTW WinXP picks up the support again to use command lines for defragging.

This discussion is closed to new replies.