Deleted files by mistake: what can be recovered, what not to do
This guide is for anyone who deleted a file, a folder or photos and wants them back. You will find the right order to search in, what else can be saved, and the mistakes that turn a possible recovery into an impossible one.
What do you do in the first minute after deleting?
Stop writing to the disk. When you delete a file, Windows does not erase its contents. It marks the space as free, and according to Microsoft that space can be overwritten at any moment by new files.
- If you just deleted it in File Explorer, press Ctrl+Z. This undoes the last deletion.
- Do not download, install or save anything on that disk. Even an open browser writes to the disk in the background.
- If the files were on a USB flash drive, a memory card or an external drive, eject it safely and do not use it until you decide what to do.
- If the files were on drive C and you have nothing to check in the Recycle Bin or the cloud, consider shutting down the computer until you decide.
Was the file really deleted, or did it just move?
Before assuming the file was deleted, it is worth making sure it is not simply somewhere else. An accidental drag in File Explorer moves a whole folder into the folder next to it, and that looks exactly like a deletion.
- In File Explorer, select “This PC” and type part of the file name into the search box.
- Check the “Downloads” folder, and sort by “Date modified”.
- If the file was opened in a specific program, such as Word, check that program’s recent files list. It also shows the location.
- If you use OneDrive, check the recent files list on its website.
Where do you look first?
Check from the simple place to the complicated one, and stop as soon as you find it:
- The Recycle Bin on the desktop. Find the file, right-click, “Restore”. It goes back to its original location.
- The cloud’s recycle bin, if the folder was synced to OneDrive or Google Drive. A deletion on the computer is deleted in the cloud too, but the cloud has a separate bin.
- Previous versions, if File History was turned on.
- Your backup, if you have one: an external drive, Time Machine on a Mac, or a copy with someone else. For example, a file you sent by email or WhatsApp.
Only if all of these are empty do you move on to recovery software, and even then with care.
When will the file not be in the Recycle Bin?
When it was deleted in a way that bypasses the bin. That happens more often than you would think:
| How the file was deleted | Where it is now | What to do | When to go to the lab |
|---|---|---|---|
| Normal Delete on an internal drive | In the Recycle Bin | Restore from the bin | Not needed |
| Shift+Delete | Not in the bin. The space is marked as free | Stop writing to the disk, check the cloud and your backup | If the files matter and there is no backup |
| Deleted from a USB flash drive or memory card | Not in the bin | Disconnect it and save nothing on it | If the files matter |
| You emptied the Recycle Bin | Not in the bin | Cloud, previous versions, backup | If all of those are empty |
| File too big for the bin (Windows asks whether to delete permanently) | Not in the bin | Same as Shift+Delete | If there is no backup |
| Folder synced to the cloud | In the OneDrive or Google Drive bin | Restore from the website, before the time runs out | Almost never |
| Disk was formatted | Not in any bin | Do not write to the disk at all | Immediately, if the data matters |
How do you get files back from OneDrive or Google Drive?
You go to the cloud service’s website and restore from its recycle bin, not from the computer.
- OneDrive: go to onedrive.live.com, choose “Recycle bin”, select the files and click “Restore”. According to Microsoft’s page on restoring in OneDrive, in a personal account items are deleted from the bin automatically after 30 days, and in a work or school account after 93 days, unless the administrator changed that.
- Google Drive: the files are in “Trash” and are deleted from it automatically after 30 days.
- Google Photos: backed-up photos stay in the trash for 60 days, and photos that were not backed up are deleted after 30.
The clock starts at the moment of deletion, not at the moment you noticed the file was missing.
What is “previous versions”, and when does it work?
“Previous versions” is a Windows option that takes a folder or a file back to the state it was in a few days ago. It only works if File History was turned on before the deletion.
- Open File Explorer and go to the folder where the file used to be.
- Right-click the folder, “Restore previous versions”. In Windows 11 you may first need “Show more options”.
- In the “Previous Versions” tab, choose a version dated before the deletion.
- Prefer “Restore to”, so you do not overwrite the current version.
If the list is empty, there was no such backup. Microsoft’s guide to File History explains how to turn it on, so that next time it works.
Why is recovery harder on an SSD?
Because on an SSD the computer tells the drive which areas have been freed (a command called TRIM), and the drive cleans them in the background to stay fast. Once that has happened, the contents are really gone, and no software will bring them back.
On a mechanical hard drive (HDD) things are different: the contents stay on the disk until something new is written over them. That is why on a mechanical disk the odds are usually better, while on an SSD they are low, and drop over time.
USB flash drives and memory cards usually behave more like a mechanical disk in this respect, so there is a chance with them too. If you deleted photos from a camera card, take the card out immediately and do not shoot any more on it, because every new photo is written onto the space that was freed.
How do you know which one you have? Open Task Manager (Ctrl+Shift+Esc), go to the “Performance” tab and click the disk. SSD or HDD appears in the corner. Most new laptops have an SSD.
Is Windows File Recovery worth trying?
You can, if the files matter less to you and you are comfortable with a command line. Windows File Recovery is a free tool from Microsoft, and according to its support page it is available in the Microsoft Store and works on internal, external and USB drives, but not on the cloud and not on network folders.
- Install Windows File Recovery from the Microsoft Store.
- Open it from the Start menu and approve the permission prompt.
- The command is built like this:
winfr C: E: /regular /n \Users\<username>\Documents\. C is the drive you are recovering from, E is the drive you are saving to. - The
/regularmode is for files recently deleted from a healthy NTFS drive. The/extensivemode is more thorough, and also suits USB flash drives and memory cards.
The built-in problem: if the files were deleted from drive C and you have only one drive, the installation itself is written to that same drive. Microsoft itself requires the destination drive to be different from the source drive, but the installation cannot be moved to another drive. When the files really matter, it is better to install nothing and take the disk out to be examined in another computer.
What must you not do?
- Install recovery software on the disk you are recovering from. The installation can overwrite the files you are looking for.
- Save the recovered files to the same disk. Always to a different disk.
- Run “cleaner” or “optimizer” programs. Some of them delete exactly the remnants that recovery depends on.
- Format or reinstall Windows to “start clean”. That writes over the whole disk.
- Keep trying, again and again, on a disk that makes noises. That is no longer a deletion but a hardware fault. Read the guide the hard drive clicks or is not detected.
When to bring the computer to the lab
Stop trying on your own as soon as one of these is true:
- The files matter to you, there is no backup, and the Recycle Bin and the cloud are empty.
- The files were deleted from drive C, and you have no way to search without installing something on that same drive.
- The disk was formatted, asks to be formatted, or makes noises.
- You tried one program and it found nothing. A second and third attempt on the same disk only raises the risk.
At the lab it starts with an examination of the disk, and you are told what the odds are before you pay for an attempt. It is important to say this plainly: there is no promise that everything, or even part of it, will be recovered. We will do our best. Whatever is recovered goes to you, and we do not keep a copy.
Did it not work out?
The goal of this guide is for you to get the files back yourself, and most of the time that happens at the Recycle Bin or cloud stage. If not, ChipLab in Haifa handles recovery of deleted data, and once the files are back, it is worth reading how to back up your computer at home so it does not happen again.