The chkdsk command can accomplish this but for a better understanding of the situation, we recommend you give SeaTools a shot. Diagnosing the hard disk for bad sectors now and then is a good practice.
The best way to prevent (or to know before it happens) a disk failure is to perform routine checks on it.
Can’t take a chance, right? (yeah, well, you probably could if you back up data and create system images regularly, but it’s still a big hassle) If devices like RAM, web camera, touchpad fail to function one can get it replaced at the nearest service center but what if your hard disk crashes! Of course you can purchase and install the new hard disk without any effort but what about the data which is gone forever.