You may need to recover data in 2 different cases - when there is a hard disk drive (HDD) failure or files have been deleted accidentally. If there is a mechanical failure in the hard disk, recovering data may not be possible, unless the mechanical problem is fixed.
How to fix it
1. Connect the problematic hard drive to a working computer as a secondary drive (slave). Start the computer and check if the drive is recognized during the POST. If it does not show up, there could be a mechanical problem in the hard drive, which has to be fixed first.
Download PC Inspector File Recovery software on the master drive, and run the software. While it usually fixes most problems, it may not work in a few cases.
Another free utility for recovering data from damaged FAT, FAT32 and NTFS partitions is the bootable Knoppix Linux distribution CD.
Download Knoppix Linux Distribution CD
Detailed instructions on how to use Knoppix to recover data
If you realize that you have accidentally deleted data from your computer.
1. Check the Recycle Bin. Unless you have emptied your recycle bin , the deleted file will be present and restoring it is simple. You can choose to undelete a single file or multiple files at a time.
2. If the recycle bin has been emptied and you have not written any more data on the hard disk, you can recover the file. When you delete a file, the file remains on the hard disk, only the record on the MFT (Master FAT Table) marks the file storage location as free. This "free" space is overwritten the next time a file is written onto the hard disk.
Copying a large file takes a long time since data is written on the hard disk, while deleting a file takes a much shorter time, since only the MFT is modified. Also do not defragment the hard disk, since data recovery will be difficult.Similarly if a partition is accidentally deleted, do not create a new partition.