How to Prevent Unwanted File Recovery
Tags: beginners, testing, tutorial, security
Published: 2021-11-22 05:14:02

Read this article to find out how files are removed and why they can be recovered, how to recover deleted files – or remove them permanently.

While files are just deleted from the hard disk in a conventional way, they don’t actually disappear – the information about these files remains on the hard disk even after you empty the Recycle Bin. It is this peculiarity that lets these files to be recovered – by you, or by other people… If you are not cautious enough, the removed confidential files can be recovered by other people, and used for purposes you may not like.

##What happens when a file is removed
Windows tracks file location on the hard disk with a sort of labels. Every file and folder have this label that helps the operating system determine the beginning and the end of file.

When you delete a file, Windows removes the label and marks the sectors where file data is located as free space. From the viewpoint of the file system, such files are no longer present on the hard disk, and such sectors are believed to be vacant.

That is why such deleted files are available for recovery until Windows overwrites them with new information. A data recovery tool can scan the hard disk, detect such data and recover the files. If the data of such deleted file was overwritten partially, only a part of data will be recovered, which may render the recovered file to be damaged or bad.

With all that in mind, remember that the principles behind solid-state drives are different from those on which conventional hard disks are based.

YouTube: {% youtube ulLtvlALrWQ %}

##Why removed files are not erased instantly
Then why doesn’t your computer erase deleted files just as you remove them? Removing the file label and marking this disk space as free is a very quick operation. On the contrary, erasing file info from the disk surface by overwriting it is going to take much longer. For example, it takes almost no time to remove 10 Gb of files. However, erasing this data will take a few minutes – just as long as the computer needs to write 10 GB of information to the hard disk.

So in order to improve performance and reduce time needed to manage data, Windows and other operating systems do not erase data when deleting files. But if you need to erase file contents when deleting it, you can use a special eraser tool.

As we have already said before, solid-state drives (SSDs) work in a different way. All the things above apply to conventional hard disks (HDDs). While you are using an SSD with the TRIM feature enabled (it is present in all modern PCs), deleted files are erased in a second and can’t be recovered. An interesting fact is that external solid-state drives don’t work that way, but tend to treat deleted data just as their ancestors, HDDs.

The operating system erases files instantly to increase the speed of writing data in the future, and if the file data is not erased immediately, this will have to be done when saving new files to the disk – which is going to make the SSD slower, over time.

###Recovering deleted files
If you deleted a file accidentally, here’s what you should keep in mind:

The file has to be recovered as soon as possible: Windows keeps on writing new data to the hard disk, and every minute increases the chances that the data you are worried about is to be overwritten. So to make the process successful rather than not, start the recovery action without delay.
Reduce using the hard disk to a minimum: the best way to recover a deleted file from a hard disk is to power off this computer, and connect its hard disk to another PC, then recover the require file from the operating system of the other PC. If you continue working with the hard disk that the file was removed from, you are taking a risk of overwriting it.
Windows has no built-in tools to scan the hard disk for deleted files. However, this drawback is compensated by a huge number of third-party products that do a great job of bringing your files back.

A utility for data recovery after formatting a hard disk will scan your storage device and get the deleted files back.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/are53gv0abt7q6godf5n.jpg)

##How to prevent unwanted file recovery
If there is some confidential or personal data on your computer, it could be important for you to make them impossible to recover and guarantee it will never fall into somebody else’s hands. If you are going to sell or lend your computer or hard disk, this is one of the things to take care of.

For this purpose, you can use one of the many tools for cleaning the hard disk that will overwrite all data on such disk and all deleted files will be destroyed.

However, even using such programs doesn’t always guarantee the desired result. You may erase a part of the hard disk or one of the local disks, while the other local disk may contain copies of the deleted files. That is why it is always best to clean all physical disks.

Bear in mind, though, that this process takes much longer than just deleting the files.

Now you know why and when deleted files can be recovered, and when they can’t. Remember about it when you decide to get rid of the computer or hard disk – because that hard disk may still contain confidential data.