Lifehack



Lifehacker hard drive health

Geek to Live: The self-repairing hard drive  February 18, 2016 – 02:32 am
Keep Tabs on Hard Drive Health

Ever since my laptop's hard drive gasped its last breath a few weeks ago, I've been more diligent than ever about keeping my disks healthy. Thanks to an automatic backup system, the disk failure was more an inconvenience than a catastrophe, but not one I want to deal with more often than absolutely necessary.

A few weeks back Adam showed us how to schedule disk defragmentation using Windows Scheduled Tasks. Today I've got a batch script that takes disk maintenance to the next level by checking all your hard drives for errors, repairing any it finds, and then defragmenting.

  • If errors are found, repairs them and defrags.
  • If the drive is a boot disk, sets chckdsk to repair errors after the next reboot and defragments the drive optimized for booting.

Here's how to get the DiskChecker script set up.

  1. Create a new text file called DrvLtr.txt. List all the hard drives on your system you want checking, one per line. Then make the last line read, "end." For example, my DrvLtr.txt file looks like this:

    C:

    D:

    G:

    end

    Do not include CD or DVD drives in your DrvLtr.txt disk list.

  2. Save DrvLtr.txt to the same directory where you saved DiskChecker.bat.

Now, to schedule DiskChecker to run regularly, from Control Panel, open Scheduled Tasks. From the File menu, choose New > Scheduled Task, and name the task "Disk Checker." In the Run: field, enter the full location of DiskChecker.bat. Mine reads: "D:\data\gina\scripts\DiskChecker.bat."

You only want to run this task if nothing else is writing or reading from the disk. So on the Settings tab of the task, check off "Only start the task if the computer has been idle for:" option, and set it to 5 or 10 minutes.

Set DiskChecker to run as often as you'd like. It depends on how much use your hard drive gets. Mine spins 24 hours a day, and it stores my photos, music collection and work documents; it records TV shows throughout the week that I watch and delete and copy to and from other disks. In short, a lot of bits and bytes get written to and read from the multiple hard drives on my computer, so I've scheduled DiskChecker to run once a week.

You can also schedule a system reboot an hour or so after the checker runs, just in case errors were found and have to be repaired. You can get more on scheduling a reboot in Adam's previous article, Using Windows Scheduled Tasks. Be warned, though: the dskchk that runs at startup completely locks your computer for as long as it takes to complete, and that can be a long time for larger disks. My 110GB C: drive took over an hour to repair on reboot this morning, so be sure to schedule the reboot well before you'll need your computer to get work done.

Source: lifehacker.com

You might also like:

Groovedown Downloads Grooveshark Tracks to Your Hard Drive
Groovedown Downloads Grooveshark Tracks to Your Hard Drive ...

Related posts:

  1. Lifehacker hard drive reliability
  2. Lifehacker hard drive speed
  3. Lifehacker hard drive repair
  4. Lifehacker hard drive test