Deleted a file by mistake: how to get it back
Stop saving new things to that drive, and look in the easy places first. Most deleted files are still there.
What you seeA file or folder is gone
The first rule
When a file is deleted, Windows only marks its space as free. The contents remain until something new is written over them. So the chance of recovery falls with every download, install or save. Use the drive as little as possible until the file is back. Do not install recovery software onto the same drive.
1. Undo
If you just deleted it in File Explorer, press Ctrl + Z in that window, or right-click an empty area › Undo Delete.
2. The Recycle Bin
Open Recycle Bin on the desktop. Sort by Date Deleted, or use the search box. Right-click the file › Restore; it returns to its original folder.
It will not be in the bin if you pressed Shift + Delete, emptied the bin, deleted from a pen drive, memory card or network drive, or the file was larger than the bin's limit.
3. Was it really deleted?
Search before assuming the worst. Files are often moved by a slip of the mouse.
- Press the Windows key and type part of the name. In File Explorer, search "This PC".
- Check Recent in File Explorer's Home, and the File › Open › Recent list of the program that made it.
- For an unsaved or overwritten Office document: File › Info › Manage Document / Version History › Recover Unsaved Documents.
4. Cloud copies
- OneDrive: files in synced folders (often Desktop, Documents, Pictures) go to OneDrive's own recycle bin when deleted. Sign in at onedrive.com › Recycle bin. Items stay there for a limited number of days.
- Google Drive, Dropbox: each has a Bin or Deleted files section on its website.
- Email: a file you once sent or received is still attached to that message.
- Phone: photos may still be in the phone's gallery or in Google Photos' or iCloud's bin.
5. Backups and previous versions
- File History (if it was switched on): open the folder that held the file, then right-click the folder › Show more options › Restore previous versions, or search the Start menu for "Restore your files with File History".
- Previous Versions also draws on restore points for some folders: right-click the folder › Properties › Previous Versions tab.
- Windows Backup or your own copies on an external drive.
If these come up empty, you had no backup running. See back up first to set one up today.
6. Recovery software
For a permanently deleted file, a recovery tool scans the drive for remains.
- Microsoft's own free tool is Windows File Recovery, from the Microsoft Store. It is a command-line program. Save recovered files to a different drive from the one being scanned. A typical command to look for Word documents deleted from C: and save them to D: is:
winfr C: D: /regular /n *.docx
- Well-known third-party recovery programs have a simpler window. Download only from the maker's own site, install to a different drive or run from a USB stick, and scan.
Results depend on the drive. On a hard disk or pen drive, recently deleted files are often recoverable. On a modern SSD, Windows tells the drive to wipe freed space soon after deletion (a feature called TRIM), so permanent deletions are usually gone for good within minutes.
7. When to use a professional
For files of real value on a drive that is failing, clicking, not detected, or was formatted: stop, switch it off, and consult a data recovery service. Every further attempt on a damaged drive lowers the odds. Ask for a quotation first; charges depend on the kind of damage.
Prevent the next time
- Turn on File History or OneDrive folder backup, or copy important folders to an external drive every week.
- Avoid Shift + Delete as a habit.
- Give the Recycle Bin enough room: right-click it › Properties › Custom size.
- Be careful with "Cut": copy first, check, then delete the original.
Can files be recovered after emptying the Recycle Bin?
Sometimes, with recovery software, if the space has not been reused. On hard disks the chances are fair; on SSDs they are poor.
How long do files stay in the Recycle Bin?
Until you empty it, unless Storage Sense is set to clear it after a number of days or the bin is full.
For Windows 11 and Windows 10. Written in November 2026. Menus move between updates; use the search box in Settings if a name differs. Back up important files before any step that resets, repairs a disk or opens the computer. This is an independent guide, not connected with Microsoft.