How to Recover Accidentally Deleted Files on Windows
You emptied the Recycle Bin and only then realized the folder you needed was still in it. Or you held Shift while deleting, and the file skipped the Recycle Bin entirely. The good news: on Windows, deleted files are usually recoverable for free — but every minute matters, and the very first thing you do matters more than the tool you pick.
The golden rule: stop using the drive that held the file, right now. When Windows "deletes" a file it only marks the space as free — the data stays on the disk until something else overwrites it. Every new download, every browser page load, every temp file is a chance to bury your file for good. Minimize activity on that drive and do not install recovery software onto it.
Step 1: Check the Obvious Places First
Before any tool, spend two minutes ruling out the easy wins.
- Recycle Bin: open it, use the search box for the file name, right-click → Restore.
- Did you save over it or move it? Search the whole drive from File Explorer (type the file name in the search box at the top). Files migrate in mysterious ways — a "deleted" report is often just in Downloads instead of Documents.
- Cloud copies: if you had OneDrive, Dropbox or Google Drive sync on that folder, log into the website. Most keep deleted files in their own trash for 30 days or more, and OneDrive even keeps version history per file.
- Email and chat attachments: the version you sent someone last week may be sitting in Sent Items or a chat history.
Step 2: Restore a Previous Version
Windows can roll a folder back to an earlier snapshot if File History or System Protection was on — and many PCs have it on by default for the system drive.

- In File Explorer, right-click the folder that contained the file (restoring a parent folder usually works even if the file itself is gone).
- Choose Restore previous version.
- If a list of dated snapshots appears, pick one from before the deletion, open it to confirm your file is inside, then click Restore (or drag the file out to the desktop).
This is instant, free and safe. If the list is empty, File History simply was never enabled — keep reading.
Step 3: Recover with Windows File Recovery
Microsoft publishes its own free command-line recovery tool, Windows File Recovery, from the Microsoft Store. It works on Windows 10 (2004+) and Windows 11, reads NTFS, FAT and exFAT drives, and has no size limits or upsells.
How to use it
- Install Windows File Recovery from the Microsoft Store (it installs in seconds).
- Preferably save the recovered output to a different drive — a USB stick or a second disk. Saving to the same drive risks overwriting what you are recovering.
- Open Terminal (Admin) and use this pattern:
winfr C: D:\Recovery /regular /n \Users\YourName\Documents\report.docx
This scans drive C: for that specific file and writes it to D:\Recovery. - To recover a whole folder and type of file instead:
winfr C: D:\Recovery /regular /n \Users\YourName\Pictures\*.jpg - If the regular mode finds nothing, retry with /extensive instead of /regular. It takes much longer but digs deeper, including into formatted or partly damaged areas.
The syntax looks scary but it is just "source drive, destination folder, mode, file filter". Start narrow — one file name — and widen only if needed.
Step 4: Third-Party Tools When All Else Fails
If Microsoft's tool comes up empty, two well-known free options are worth a try:
- Recuva (Piriform, the CCleaner makers): friendliest interface, a wizard walks you through it. Use the "Deep Scan" option for Shift+Deleted files. Decline the bundled extras during install.
- PhotoRec (open-source companion of TestDisk): ugliest interface, deepest reach. It ignores the file system and carves files by signature, so it can pull photos and documents out of badly damaged drives. It recovers by file type rather than name, so expect generic file names.
Same rule as before: install the tool and save the results on a different drive than the one you are scanning.
When Recovery Simply Is Not Possible
Be honest with yourself about two cases, so you stop wasting hours:
- SSDs with TRIM enabled: most modern laptops and PCs store Windows on an SSD, and TRIM commands the drive to erase deleted data within minutes for performance reasons. Recovery from the system SSD is often impossible if hours have passed. External USB drives, older hard disks and flash drives behave differently and keep data much longer.
- Heavy overwrite: if the drive was nearly full or the PC kept writing large files since the deletion, the space may genuinely be reused. Nothing recovers what no longer exists.
Make This the Last Time
Ten minutes of setup now beats any recovery session later:
- Turn on File History: Settings → System → Storage → Advanced storage options → Backup options, point it at an external drive or a second disk. It snapshots your files continuously and makes Step 2 above work forever.
- Keep OneDrive (or another cloud sync) on your Documents, Desktop and Pictures folders — its own 30-day trash is a free second safety net.
- Get into the habit: Delete moves to the Recycle Bin, Shift+Delete is for things you are certain about.
FAQ
Does the file still exist after emptying the Recycle Bin?
On a traditional hard drive or a USB stick, yes — until overwritten. On the system SSD, usually not for long, because of TRIM. That is why the "stop using the drive" rule matters within minutes on modern laptops.
Can I recover files from a formatted drive?
Often yes, especially if it was a quick format and little was written since. Windows File Recovery's /extensive mode and PhotoRec are built for exactly that. The odds drop sharply the more the drive is used after formatting.
Are the paid recovery tools better?
Their deep-scan engines are similar to the free options above. What you mostly pay for is convenience and support. Try the free route first — it resolves the majority of ordinary deletions — and only consider paid services for physically damaged drives, which are beyond any software anyway.
Quick Checklist
- Stopped using the affected drive immediately
- Checked Recycle Bin, full-drive search, cloud trash and email
- Tried Restore previous version on the parent folder
- Ran Windows File Recovery, output to a different drive
- Escalated to /extensive, then Recuva or PhotoRec
- Set up File History and cloud sync to prevent a repeat
Most accidental deletions end happily if you act before the space gets reused. Check the obvious places, try the built-in previous versions, then let Windows File Recovery dig — and set up File History tonight so the next scare lasts thirty seconds instead of an afternoon.
Act First: What You Must Not Do
Recovery is a race against the disk, and the only thing that matters in the first sixty seconds is not making it worse. Do not, until you have checked the recovery options below:
- Do not save anything new to the drive the files were on. Every write can overwrite the clusters the deleted files still occupy.
- Do not empty the Recycle Bin. If the files were deleted with Delete, they are there, and they are recoverable.
- Do not install recovery software onto that drive. Install it on a USB stick or a different drive, and scan from there.
- Do not run a disk cleanup, defragment, or "free up space" tool. Defragmentation actively moves data around, which is exactly what you do not want.
- Do not keep using the machine if the drive is failing. Copy what matters to another drive first, and treat recovery as the lower priority.
Step 1 in Detail: The Places a Deleted File Usually Hides
Most "deleted" files have not been deleted. Work through these in order, because each takes seconds and the deeper options take hours.
- The Recycle Bin — restore from there if the file is present. Files larger than a few gigabytes bypass the Recycle Bin by default.
- The OneDrive folder — if OneDrive was configured to sync your Documents, Desktop and Pictures, the file may exist in the cloud even after you deleted it locally. Right-click the OneDrive icon and choose Version history.
- File History — if it was set up, it holds timestamped versions of your files. See our backup guide for how it is configured.
- Previous Versions — right-click a folder, Properties → Previous Versions. This works on folders on NTFS volumes and can recover a file that was overwritten.
- Shadow Copies — run vssadmin list shadows in an elevated Command Prompt. System Restore points may hold copies of files that were deleted.
- The application itself. Some applications keep their own working copies: recent documents in Word, Excel, Photoshop's scratch files, and Outlook's local copies of attachments.
Step 2 in Detail: Browsing Volume Shadow Copies
Windows keeps snapshots of NTFS volumes for System Restore and File History. To reach one manually, open File Explorer, right-click the drive, choose Properties → Previous Versions, pick a version from before the deletion, and click Open to browse it.
Two things to know. First, the versions shown may be very old — they are spaced by the System Restore schedule, not by your file activity, so a "previous version" from three weeks ago may be the closest one available. Second, opening a previous version is read-only: you browse it and copy what you need out, you cannot browse into it and edit in place.
Step 3 in Detail: The winfr Commands Explained
Windows File Recovery is a free Microsoft command-line tool, and it is the right tool when the file was deleted from an SSD or a modern laptop with no recycle bin and no backup. It is in the Microsoft Store under Windows File Recovery.
The important thing is that it must run from a different drive than the one you are recovering from. You need a USB stick of at least the same size as the volume, and you cannot recover to the original drive.
The commands follow a pattern, and the mode matters:
| Command | What it does | Use when |
|---|---|---|
winfr C: D: /regular | Recovers recently deleted files | The usual choice — the file was deleted days ago, not months |
winfr C: D: /extensive | Deep scan of the whole drive | Older deletions, or many files, or a fragmented drive |
winfr C: D: /? | Shows the full option list | Before using any filter options |
Run it from an elevated Command Prompt, with D: being a drive other than C:. It will ask you to confirm with Y, then it prints a progress indicator for a long time — on a large drive with the extensive mode, this can be several hours. When it finishes, look in a folder named Recovery_date on the target drive.
Start with /regular. It is far faster, and if the file was deleted recently that is where it will be. Use /extensive only if the regular scan comes back empty.
Step 4 in Detail: TestDisk and PhotoRec
Two free tools are widely used and are worth trying at this point:
- TestDisk — open source, no recovery limits on the free version, and it handles partitions as well as files. It is the more powerful option but the interface is more technical.
- PhotoRec — also by the same author, and it recovers by file signature rather than by filesystem structure, which means it can recover files even when the filesystem is damaged. It is limited to specific file types and it recovers files without their original names, so it is most useful for photos and documents.
Both are best run from a USB stick, booting into a live Linux environment rather than installing Windows on the machine, so that nothing writes to the drive. Expect to spend time with the file headers rather than clicking through a wizard.
Cases Where Recovery Is Genuinely Impossible
Some things cannot be recovered, and knowing which cases saves a lot of time:
- The storage was reused. On a traditional spinning disk, the data is often physically overwritten fairly quickly, especially on an SSD with TRIM enabled, where the controller can erase blocks almost immediately after deletion.
- The drive is failing. If the drive is clicking, disappearing from the BIOS, or reporting errors, do not run recovery tools on it — every read can accelerate the failure. Get the data off a dying disk with a low-level imaging tool or a professional service, and image it to a healthy drive first.
- Encryption was active. Without the key, the file contents are unrecoverable regardless of what the filesystem says.
Setting Up Backups So You Never Search This Page Again
- Turn on File History or use Time Machine, and check that a version actually exists. Backups are the only real answer to this problem.
- Use OneDrive's Files On-Demand so your working files live in the cloud without filling the disk.
- Test the restore once, deliberately. See our backup guide for the test procedure — an untested backup is a hope, not a backup.
Part of a collection
This guide belongs to our Windows fixes collection (16 guides on the same problem).
Editorial review
- First published
- Last reviewed
- Applies to
- Windows 11 22H2 and later
- Reviewed by
- The TechFix Guide editorial team
Verified the Windows File Recovery tool name and corrected the drive letter reference in the recovery steps.
Menu paths, option names and file paths in this guide were checked against the version named above. We do not claim to have tested every brand of hardware, so if your build shows something different, tell us and we will correct the page. How we check our guides · Report an error