Some time ago I wrote a script to automate disc defragmenting so that I could schedule it to late nights when no one is using the computer anyway. It turned out to be quite simple using VB scripting and Windows scheduler. Below you can see the commented script I use. You might need to make a couple of modifications if you have a localized copy of Windows (keyboard short-cuts and application names may be different).
Popularity: 4% [?]