To recover a deleted file on Windows 10, open the Recycle Bin, right-click the file and select Restore; if it isn’t there, check the OneDrive recycle bin, then File History or another backup, and only then try Microsoft’s free Windows File Recovery tool. Work through those in that order, because each one is quicker and more reliable than the next, and stop saving new files to the drive until you have what you need.
Everything here is built into Windows 10 or comes from Microsoft. Windows 10 reached end of support on October 14, 2025, but all of these recovery tools still work on it.
First, stop using the drive
When Windows deletes a file for good, it doesn’t wipe the data straight away. It marks the space the file used as free, so the file can still be recovered until something new is written over it. Microsoft’s own advice for Windows File Recovery is to minimize or avoid using the computer, because almost anything you do (downloading, installing an app, even browsing) creates files that can land in that space.
- Don’t save, download or install anything on the drive the file was on until you’ve finished.
- Don’t run disk cleanup or defragment tools, and don’t create or resize partitions.
- If you have a spare USB drive or external hard drive, get it ready. You’ll need it as a destination if you use Windows File Recovery, because the tool can’t save recovered files to the drive it’s scanning.
This matters most for files deleted with Shift + Delete or emptied from the Recycle Bin. A file that’s sitting in the Recycle Bin or in a backup is safe, so the first three methods carry no risk.
Which method fits your situation
| What happened | Try this first |
|---|---|
| You pressed Delete a moment ago | Ctrl + Z in the same File Explorer window |
| You deleted a file normally (Delete key or right-click > Delete) | The Recycle Bin |
| The file was in OneDrive (Desktop, Documents or Pictures backed up to OneDrive, or the OneDrive folder) | The Recycle Bin, then the OneDrive recycle bin online |
| You emptied the Recycle Bin, or used Shift + Delete, and File History was turned on | Restore previous versions (File History) |
| Permanently deleted and no backup | Windows File Recovery |
| The drive clicks, isn’t detected or the PC won’t start | Stop and contact a professional recovery service |
Method 1: Undo the delete or restore it from the Recycle Bin
If you’ve only just deleted the file and the File Explorer window is still open, press Ctrl + Z straight away. Microsoft lists Ctrl + Z as the shortcut to undo the previous action, and in File Explorer that includes a delete. The file reappears where it was. On many PCs, right-clicking an empty area of the folder also shows an Undo Delete command that does the same thing. This only works for your most recent actions in that session, so if you’ve closed the window or done other things since, use the Recycle Bin instead.
A normal delete (pressing Delete or Ctrl + D, or choosing Delete from the right-click menu) moves the item to the Recycle Bin rather than erasing it. To get it back:
- Open the Recycle Bin. Double-click the Recycle Bin icon on the desktop. A window opens listing everything that’s been deleted, with the original location and the date each item was deleted.
- Find the file. Type part of the name in the search box at the top right of the window, or switch to Details view and select the Date Deleted column heading so the newest deletions are at the top.
- Restore it. Right-click the file and select Restore. It goes back to the folder it was deleted from, not to the desktop.
- Check the original folder. The Original Location column told you where it came from. Open that folder and make sure the file opens.
To bring back a batch at once, select them together in the Recycle Bin (Ctrl + click picks individual files, Shift + click picks a range, and the other ways are in this walkthrough on selecting multiple files on Windows), then right-click any one of them and choose Restore. The Restore all items button on the Manage tab restores everything in the bin, which you rarely want.
If the file isn’t in the Recycle Bin
Some deletions skip the Recycle Bin entirely:
- Shift + Delete. Microsoft describes this shortcut as permanently deleting the selected item without moving it to the Recycle Bin.
- The bin was emptied, either by you or by a cleanup setting.
- The file was on a USB flash drive, memory card or network folder. Files deleted from removable drives and network locations are often deleted permanently instead of being recycled.
- The file was too large for the Recycle Bin. In that case Windows warns you that it will be permanently deleted before it does it.
Before you assume a file is gone, check whether it was only hidden. A file marked as hidden doesn’t show in File Explorer but still exists, and turning on hidden files in Windows 10 takes a single checkbox on the View tab. It’s also worth typing the file name into the search box on the taskbar, in case it was moved rather than deleted.
Method 2: Restore it from the OneDrive recycle bin
If the file was stored in OneDrive, including a Desktop, Documents or Pictures folder that’s backed up to OneDrive, there’s a second safety net. Microsoft says files deleted from your OneDrive folders on the PC go to the Windows Recycle Bin, so check there first. Files deleted from the cloud, including online-only files (the ones with a cloud icon), don’t appear in the computer’s Recycle Bin, so you need the OneDrive website:
- Go to onedrive.com in a web browser and sign in with the same Microsoft account (or work or school account) you use on the PC.
- In the navigation pane on the left, select Recycle bin.
- Point to each item you want, select its circle check box, and then select Restore. The file goes back to its OneDrive folder and syncs down to your PC.
Time limits apply. Microsoft says personal accounts can restore files deleted within the last 30 days, and work or school accounts within 93 days unless an administrator changed that. Once something is permanently deleted from the OneDrive recycle bin, it can’t be restored. Microsoft 365 subscribers also have a Restore your OneDrive option that rolls the whole OneDrive back to a point in the last 30 days, which helps after a large accidental deletion. Word documents deleted through OneDrive follow these same rules, as the steps to delete a Word document explain.
Method 3: Get an earlier copy with File History (Restore previous versions)
File History is Windows 10’s built-in backup for personal files. It copies your libraries and desktop to an external drive or network location every so often. The catch: it only helps if it was turned on before the file was deleted. It’s off until you set it up, so if you never connected a backup drive and turned it on, this method won’t show anything.
- Connect the backup drive. Plug in the external drive File History uses, or make sure the PC can reach the network location.
- Go to the folder. Open File Explorer and browse to the folder that used to contain the file. If it was at the top level of a drive (for example directly on D:), use the drive instead.
- Open the previous versions. Right-click the folder name and select Restore previous versions. The folder’s Properties window opens on the Previous Versions tab.
- Pick a version from before the deletion. Versions are listed by date. To look inside one first, expand Open and select Open in File History, then find your file in that view.
- Restore the copy. Select Restore, or expand the Restore button and select Restore to to save it somewhere else.
Use Restore to when you’re not sure. Microsoft warns that a restored file or folder replaces the current version on your computer, and that the replacement can’t be undone, so restoring a whole folder over the top of your current one can overwrite newer files. If the file was inside a library such as Documents, right-click its real saved location rather than the library entry. Microsoft’s File History backup and restore page covers setup and restore for both Windows 10 and Windows 11.
If the Previous Versions tab says there are no previous versions available, File History wasn’t backing up that folder (or the backup drive isn’t connected), so move on.
Method 4: Restore from an older Windows backup
Some PCs were set up years ago with Backup and Restore (Windows 7), an older backup tool that’s still in Windows 10’s Control Panel. If you or a PC maker set up a scheduled backup there, open Control Panel, select System and Security, then Backup and Restore (Windows 7). Connect the backup drive, and if a file backup exists you’ll see an option to restore your files, where you can search or browse the backup and choose whether to put the file back in its original location or somewhere else. A system image made in the same tool is different: restoring it replaces the whole drive, so don’t use one just to get a single file back.
Also think about other copies you might already have: an email attachment you sent, a USB stick you copied the file to, or another cloud service you use. Each of those has its own trash or deleted items folder (Google Drive keeps a Trash, for example), so check the service the file was saved in.
When the file was permanently deleted
If the file was permanently deleted and it isn’t in OneDrive and you have no File History or other backup, the only built-in option left is to scan the drive for data that hasn’t been overwritten yet. Success isn’t guaranteed: you may get the whole file, part of it, or nothing.
The type of drive also matters. Many Windows 10 PCs use solid-state drives (SSDs), and Microsoft notes that the free space where deleted files lived may already have been overwritten, especially on an SSD. Older spinning hard drives, USB flash drives and SD cards usually give better results.
Method 5: Use Microsoft’s Windows File Recovery tool
Windows File Recovery is a free command-line app from Microsoft. Its Microsoft Store listing says it’s available for Windows 10 version 2004 and later (check your version with Windows key + R, type winver, press Enter). It can scan internal drives, external drives, USB drives and memory cards, but it doesn’t work on cloud storage or network shares, and it has no buttons or menus: you type a command.
Before you start, you need a second drive to save recovered files to. The source and destination must be different drives, so if your PC only has a C: drive, plug in a USB drive or external hard drive. Ideally, install the app before you need it; installing it after the deletion writes new data to the C: drive, which is unavoidable on a single-drive PC but worth knowing.
Choose the right mode
The tool has two basic modes. Check the file system first: in File Explorer, right-click the drive under This PC and select Properties. Your Windows drive and most external hard drives use NTFS; small USB drives and SD cards often use FAT32 or exFAT.
| Drive and situation | Mode | Switch |
|---|---|---|
| NTFS, deleted recently | Regular | /regular |
| NTFS, deleted a while ago, after formatting, or the drive is corrupted | Extensive | /extensive |
| FAT or exFAT (memory cards, many USB drives) | Extensive | /extensive |
If you’re not sure, start with Regular mode, then try Extensive if it doesn’t find the file. Extensive mode is slower but more thorough.
Run a recovery
- Install the app. Open the Microsoft Store, search for Windows File Recovery, and select Get (or Install).
- Open it as an administrator. Press the Windows key, type Windows File Recovery, and select it. When asked whether to allow the app to make changes to your device, select Yes. A Command Prompt window opens.
- Type the command. The format is winfr source-drive: destination-drive: /mode /switches. Use /n to tell it what to look for: a file name, a folder path (ending with a backslash), or a pattern with the * wildcard. For example, to look for Alex’s deleted Documents folder on C: and save what it finds to E:, type winfr C: E: /regular /n \Users\Alex\Documents\. To find every PDF and Word file instead, type winfr C: E: /regular /n *.pdf /n *.docx. Replace Alex with your own user name (type C:\Users in the File Explorer address bar to see it).
- Confirm. When asked whether to continue, type Y and press Enter. A scan can take a long time on a large drive, especially in Extensive mode. To stop it, press Ctrl + C.
- Look at the results. The tool creates a folder named Recovery_ followed by the date and time on the destination drive. Open it and check each file.
A few tips that save frustration: put quotes around any path with spaces in it (for example “\Users\Alex\Documents\Tax Return.pdf”), always include the colon after each drive letter, and use a /n filter when scanning the C: drive, because an unfiltered scan can turn up many temporary system files. If you see “Source and Destination cannot refer to the same physical partition,” your destination is on the same drive as the source; pick a different one. Microsoft’s Windows File Recovery page lists every switch, including advanced modes and the file types each one supports.
Third-party recovery programs and professional services
Many paid and free recovery programs from other companies offer a graphical version of the same kind of scan. They can’t recover data that’s been overwritten any more than Microsoft’s tool can, and there are real risks: installing one on the affected drive can overwrite the very file you want, free versions often limit how much you can recover, and downloads from unofficial sites can carry malware. If you go that way, install it on a different drive, save recovered files to a different drive, and download only from the developer’s official site.
If the drive is making clicking or grinding noises, isn’t detected, or holds files you can’t afford to lose, stop using it and contact a professional data recovery service. They can work on physically failing drives, but it’s expensive, so it’s a last resort.
Tools that won’t bring back a deleted file
System Restore is often suggested for this, but it doesn’t help. Microsoft says it rolls back system files, registry settings and installed programs without affecting your personal files, so it can’t recover a deleted document or photo. Use it for what it’s good at, and see how to do a System Restore on Windows 10 when an update or driver breaks something. Reset this PC and reinstalling Windows don’t recover files either, and they write a lot of new data, which can destroy anything you were hoping to scan for.
Check what you recovered
- Open every recovered file before you delete anything else or empty the bin. A file recovered by a scan can have the right name and size but be partly overwritten, so a document may show garbled text or a photo may be half gray.
- Copy it to a safe place. Once a file is back, save a copy on a different drive or in OneDrive.
- Undo a restore you didn’t want. Restoring from the Recycle Bin or OneDrive just moves the file back; delete it again if you picked the wrong one. A File History restore that overwrote a newer file can’t be undone (see Method 3).
- Tidy up after Windows File Recovery. Move the files you need out of the Recovery_ folder, then delete the rest of the folder from the destination drive.
Make the next deletion easy to undo
The difference between a two-minute fix and a lost file is almost always a backup. Plug in an external drive and turn on File History, or use the other built-in options in these steps to back up a Windows 10 computer. Keeping your Desktop and Documents in OneDrive adds a cloud recycle bin and earlier versions of each file.
Common questions about recovering deleted files on Windows 10
How long do files stay in the Recycle Bin?
Until the bin is emptied or runs out of room. The Recycle Bin has a size limit for each drive (right-click the Recycle Bin and select Properties to see it), and once it’s full, older items can be removed to make space for new ones. Storage Sense, if you turned it on in Settings > System > Storage, can also empty items that have been in the bin longer than the period you chose. Check those settings if files seem to vanish from the bin on their own. Once you’re sure nothing else needs saving, the steps to empty the Recycle Bin in Windows 11 also cover deleting just a few items and the size limit that makes large files skip the bin.
Why does my recovered file have a strange name or not open?
Scans sometimes find files whose names are lost, or files that were partly overwritten. Microsoft notes that in some modes, files that were in the Recycle Bin come back with names like $files.xxx inside a folder called $RECYCLE.BIN. Try opening them anyway, and if a file is damaged, run the scan again in Extensive mode or look for another copy in email or the cloud.
If the file is back, take two minutes now to set up File History or OneDrive backup so the next mistake is a simple restore.
Matthew Burleigh has been a freelance writer since the early 2000s. You can find his writing all over the Web, where his content has collectively been read millions of times.
Matthew received his Master’s degree in Computer Science, then spent over a decade as an IT consultant for small businesses before focusing on writing and website creation.
The topics he covers for MasterYourTech.com include iPhones, Microsoft Office, and Google Apps.
You can read his full bio here.