Minutes Can Be Enough
A file deleted from a laptop’s SSD can become unrecoverable in minutes. At modern PC’s, the TRIM command can be issued after the deletion, allowing the drive to wipe the freed space, rendering the file actually unrecoverable.
I learned to treat an accidental deletion as a race against time.
Stop Writing First
Simply put, deleting a file removes the record of its location and marks the space it occupied as available. The actual contents stay until the drive has to write new data anywhere. This means that deleting a huge file will make it disappear from sight, just like any other.
This is why
the first step to any undelete effort should be stopping the usage of the drive. Downloading, browsing, and even system logs can write to the drive, thus wiping the deleted file’s contents. If the system drive was deleted on, a reboot is necessary. The safest way to reboot is to halt the system and boot into an alternative computer, or use a live USB flash drive and mount the drive to it. Trying to search for undelete utilities while the system is running is not exactly an optimal task.
Results Vary
Typically, recovery utilities scan for files not marked as allocated on the drive. The success of such an operation depends deeply on how the file was deleted and what else happened to the drive.
In case of a recent deletion on a relatively empty drive, the undeleted file will have its name and path properly restored. However, if some parts of it had to be reclaimed from the disk, the result might be an incomplete or, in case of a program, corrupted file. Sometimes, the recovered file can even have a generic name, if the original file’s data was recognized, but not the filename itself.
Storage Type Matters
Hard drives, memory cards, and USB flash drives typically hold the data until they have to reclaim the space. This is why there is a chance to recover photos from a camera card, weeks after they were deleted.
SSDs, on the other hand, are much harsher to data recovery due to TRIM. Same deletion, different outcome.
Test Without Risk
Recovery is usually an emergency measure, and a reliable way to avoid data loss is regular backups of the important folders. Such a method is much safer than relying on recovery tools. If you want to test the recovery procedure, use a spare USB drive or memory card, write some innocuous file to it, then delete it. Try recovering it while the card is still mounted, then repeat the process, but on a different file and after writing some data to the card afterwards. Never test on your sole copy of any file.