When we delete a file on the hard drive, it is in, fact, not deleted physically from the drive but Windows only deletes the reference to that file. The actual file remains on the drive as is.
There are two types of data deleted from the hard drive. One is the data that is sent to the recycle bin and recycle bin keeps it until a certain limit of space used by recycle bin is used up. The other one is the files that are deleted from the recycle bin.
We assume that the files deleted from the recycle bin have been deleted permanently but actually they are not deleted and remain on the hard drive and can be recovered from data recovery software.
Let’s discuss about what happens behind the scenes when a file is deleted from the recycle bin. When a file is moved to the recycle bin, the file is removed from the directory structure and is moved to a special folder called RECYCLED. The reference to the file including the filename and its path is noted down in another file called INFO2. So when we want to restore a file from the recycle bin, the file is taken from RECYCLED folder and the path from INFO2 file and the file is restored.
But if we deleted the file from the recycle bin, then the reference to the file is removed and the space allocated to that file is tagged as free. The file still resides on the hard drive and still can be recovered using third party data recovery tools.