A deleted file is not erased straight away: the system simply marks its space as free. As long as nothing is written over it, it can be recovered. That is what it all comes down to.
What not to do
- Carrying on using the device. Browsing, installing, saving: every write can overwrite what you are looking for.
- Installing recovery software on the affected disk. This is the most common mistake: the installation overwrites precisely the files you are trying to find.
- Agreeing to “format” or “initialise” the disk when Windows or macOS offers to.
- Running a disk “repair” (chkdsk, Disk Utility): it tidies up the structure at the expense of data.
- Plugging in a failing disk ten times over. A clicking noise signals a mechanical failure; every start-up damages the surface further.
- Opening the disk, putting it in the freezer, tapping it: these “tricks” destroy what could still be saved.
What to do straight away
Stop. Switch off the computer, remove the SD card from the camera, unplug the external disk. Then check, from another device, what already exists elsewhere: the recycle bin, a backup, and above all online services. OneDrive, iCloud, Google Photos and Dropbox often keep deleted files for thirty days, and many people have their photos there without knowing it.
What you can try without risk
For an SD card or a USB stick from which files were deleted: plug it into another computer, install a reputable recovery program there, and save the recovered files onto a third device. Never onto the card itself. If the device isn’t recognised, or if it makes noises, stop there.
The special case of SSDs
On an internal SSD, the disk itself erases freed-up space within minutes (the TRIM function). A file that has been deleted and emptied from the recycle bin is often lost for good. Only a backup protects you.
Logical failure or mechanical failure
Disk recognised, silent, but files missing or partition gone: that is a logical failure, dealt with using tools and method. A disk that clicks, does not spin, has been dropped or got wet: that is a mechanical failure, which requires a laboratory equipped with a clean room. We do not have one, and we say so: in that case, we refer you to a specialist laboratory, and you receive its quote before anything is opened.
And next time
An automatic backup costs less than the simplest recovery. The 3-2-1 rule fits in one line.
In short: stop, unplug, install nothing on the medium, and ask for advice before trying anything. See Data recovery.