Defrag Hard Drives only when they are fragmented

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
It does not make sense to start a hard drive defragmentation if the drive is not really fragmented. You might be loosing lots of time if you have scheduled those defragmentations. The defrag tool in Windows can be used to check the fragmentation level of a hard drive and we are going to use this to create a script that runs defrag only when the hard drive is fragmented.
You can check the fragmentation level of a hard drive using the command line and the command defrag.exe c: /a. The tool then checks the specified hard drive and report back if it is fragmented or not.
A script by Ramesh Srinivasan uses this report to determine if a hard drive should be defragmented. The Visual Basic script can be used in the Windows scheduler or simply executed during startup or by double-clicking the file.
I copied the file to a text file and zipped it already. You can download the script here or visit the website above where the script is displayed in text form.
 
Status
Not open for further replies.
Back
Top Bottom