This can't be done as you have suggested as there is no command line
interface to the built-in defragmenter in Windows 2000.
The GUI interface isn't designed to be scheduled. However, with some
scripting knowledge it can be done. Simply write a script that runs the
defragmenter and sends the appropriate keystrokes to initiate a defrag,
waits for it to complete, and then close the GUI. You can then schedule
this with Task Scheduler.
You can also Google and look for AutoDefag - which is a program that
essentially does this exact thing. However, because it is still using the
built-in defragmenter, you still have all of the limitations of the built-in
defragmenter.
- Greg/Raxco Software
Microsoft MVP - Windows File System
Disclaimer: I work for Raxco Software, the maker of PerfectDisk - a
commercial defrag utility, as a systems engineer in the support department.
Want to email me? Delete ntloader.