Quick answer: what to do now
Deleted a file by mistake? Do this in order:
- Stop saving and installing things on the computer: new files can overwrite the deleted one.
- If you just deleted it, press Ctrl + Z (on a Mac, Command + Z) in the folder.
- Open the Recycle Bin (Windows) or the Trash (Mac) and restore the file.
- If it was in OneDrive, Google Drive or iCloud, check the recycle bin on the website: files stay there for at least 30 days.
- Not there? Try previous versions, Time Machine or Windows File Recovery.
Where to look for a deleted file, in order
When a file is deleted, Windows only marks the space it used as free. According to Microsoft, the data can stay on the drive until it's overwritten by new files. So the sooner you act and the less you use the computer, the better your chances.

Which case is yours?
How to recover deleted files: 10 ways, step by step
1Stop using the drive the file was on
Microsoft advises you to minimize or avoid using the computer to improve your chances: any use can create files that overwrite the free space.
- Don't download or install recovery software on the same drive as the deleted file.
- If the file was on a USB drive, memory card or external disk, unplug it until you try to recover it.
- If possible, save recovered files to a different drive.
2Undo the deletion right away
If you just deleted it and you're still in the same folder, press Ctrl + Z in Windows File Explorer or Command + Z in the Mac Finder. The file goes back to where it was.
It's also worth searching for the name in Windows search or Mac Spotlight: sometimes the file was just moved to another folder.
3Restore from the Recycle Bin (Windows) or Trash (Mac)

Windows
- Open the Recycle Bin on the desktop.
- Use the Date deleted column to find the file.
- Right-click it and choose Restore. It goes back to its Original location.
Mac
- Click the Trash in the Dock.
- Find the file.
- Right-click it and choose Put Back.
Not in the Recycle Bin? Files deleted with Shift + Delete, files on USB drives, memory cards and network folders, and files too large for the Recycle Bin are deleted directly. In those cases, skip to steps 5 to 8.
4Check the cloud recycle bin
If the file was in a synced folder, it may be in the service's recycle bin even after disappearing from the computer.
- OneDrive: sign in to the OneDrive website and open the Recycle bin. Microsoft keeps items for 30 days on personal accounts and 93 days on work or school accounts (unless an admin changed it). Microsoft 365 subscribers can also restore their entire OneDrive to an earlier date.
- Google Drive: open Trash in the menu, right-click the file and choose Restore. Items are deleted forever after 30 days.
- iCloud Drive: look in Recently Deleted on iCloud.com or in the Files app; Apple keeps files for 30 days. If they aren't there, Apple suggests checking Data Recovery on iCloud.com.
Files that were online-only and deleted from the website don't appear in the computer's Recycle Bin: look only in the service's recycle bin.
5Restore a previous version of the folder (Windows)

This works if File History was turned on before you deleted the file.
- In File Explorer, right-click the folder where the file was and choose Restore previous versions (or Properties › Previous Versions).
- Pick a version from before the deletion. Microsoft's example: if you deleted it today, choose yesterday's.
- Click Open to check it and copy only the file you need.
- Prefer Restore to…: the Restore button replaces the current folder, and that can't be undone.
6Restore with Time Machine (Mac)
If you back up to a drive with Time Machine:
- Connect the backup drive and open the folder where the file was in Finder.
- Open Time Machine from the menu bar or Spotlight.
- Use the arrows or timeline to go back to a date before the deletion.
- Select the file and click Restore.
7Use Windows File Recovery

It's a free Microsoft app for recovering files deleted from internal drives, external disks and USB drives when they aren't in the Recycle Bin or a backup. It doesn't work for cloud storage or network shares.
- Install Windows File Recovery from the Microsoft Store, ideally with a USB drive or external disk connected to receive the files.
- Open the app from Windows search and select Yes to allow it.
- Type the command in the format
winfr source: destination: /mode /n filter. The source and destination must be different drives. - Example to recover Word and PDF documents from drive C: to drive E:
winfr C: E: /regular /n *.docx /n *.pdf - Type Y to start. Files go to a Recovery_date_time folder on the destination drive.
Use /regular for files deleted recently from NTFS drives. Use /extensive if you deleted them a while ago, the drive was formatted or damaged, or it's a USB drive or card (FAT/exFAT).
SSD: on most computers with an SSD, the TRIM feature clears deleted blocks shortly after deletion. That's why recovery on an SSD often doesn't work, and the Recycle Bin, cloud and backups are your best chances.
8Files deleted from a USB drive or memory card
- Stop writing to the USB drive or card and unplug it.
- On Windows, use Windows File Recovery in /extensive mode, saving to another drive. Example for a card on drive F:
winfr F: C: /extensive /n *.jpg /n *.mp4 - Don't format the drive if Windows asks you to: that lowers your chances.
- The USB drive doesn't even show up? See USB flash drive not showing up and computer not recognizing USB.
9Check other places the file might be
- Email and chat attachments: search for the file name in your email, WhatsApp Web or Teams.
- Windows.old folder: if files disappeared after a Windows upgrade, Microsoft explains you can recover them from C:\Windows.old\Users for only 10 days.
- Unsaved Office documents: in Word, Excel or PowerPoint, open File › Info › Manage Document › Recover Unsaved Documents.
- Another computer or your phone: there may be a copy on another device or in your phone's backup.
10When to use a data recovery service
- The hard drive makes clicking noises, isn't recognized or was dropped.
- The drive was formatted, or the file is very important and the attempts above failed.
- Turn the device off and don't open the drive: dust and handling can ruin it for good.
- Choose companies with their own lab that diagnose before charging and guarantee data confidentiality.
How long you have to recover
| Where | Time limit | How to restore |
|---|---|---|
| Windows Recycle Bin | Until emptied or the bin fills up | Right-click › Restore |
| Mac Trash | Until emptied (or 30 days, if automatic removal is on) | Right-click › Put Back |
| OneDrive | 30 days (personal) or 93 days (work/school) | Website › Recycle bin › Restore |
| Google Drive | 30 days | Trash › Restore |
| iCloud Drive | 30 days | Recently Deleted › Recover |
| Windows.old | 10 days after the upgrade | Copy from C:\Windows.old\Users |
| Drive, no backup | Until overwritten (often quickly on SSDs) | Windows File Recovery |
How to avoid losing files again
- Turn on File History or Windows Backup on Windows and Time Machine on Mac, with an external drive.
- Keep important documents in a folder synced with OneDrive, Google Drive or iCloud Drive.
- Follow the 3-2-1 rule: 3 copies, on 2 types of media, with 1 off-site (for example, in the cloud).
- Avoid Shift + Delete and check what you're deleting before emptying the Recycle Bin.
- Use a phone too? See how to back up your phone.
Frequently asked questions
Can I recover files deleted from the Recycle Bin?
Sometimes. If you emptied the Recycle Bin, first check the cloud recycle bin and previous versions or backups. Without those, Windows File Recovery may find the file, especially on a hard drive and if the computer was barely used after the deletion.
How do I recover a file deleted with Shift + Delete?
Shift + Delete skips the Recycle Bin. Check the cloud recycle bin, use the folder's previous versions or Time Machine and, finally, Windows File Recovery, saving to another drive.
Do files deleted from a USB drive go to the Recycle Bin?
No. On Windows, files deleted from USB drives and memory cards are deleted directly. Stop using the drive and try Windows File Recovery in extensive mode.
How long do files stay in the OneDrive and Google Drive recycle bin?
In OneDrive, 30 days on personal accounts and 93 days on work or school accounts. In Google Drive, 30 days. In iCloud Drive, files stay in Recently Deleted for 30 days.
What is Windows File Recovery?
It's a free Microsoft app, available in the Microsoft Store, that searches for deleted files on internal drives, external disks, USB drives and cards. It runs in Command Prompt with the winfr command and must save files to a different drive from the source.
Can I recover deleted files from an SSD?
It's harder. On SSDs with TRIM turned on, the system clears deleted blocks shortly after deletion, and recovery software often finds nothing. That's why the Recycle Bin, cloud and backups are your best chances.
Are recovery programs safe?
Prefer Microsoft's official tool. If you use another program, download it only from the developer's official website and never install it on the same drive as the deleted file.
How do I recover deleted files on a Mac?
Open the Trash and use Put Back. If you emptied it, look in iCloud Drive's Recently Deleted or restore with Time Machine if you have a backup drive.
How do I recover an unsaved Word document?
In Word, open File › Info › Manage Document › Recover Unsaved Documents. If the file was in OneDrive, also check its version history.
When is it worth paying a recovery company?
When the hard drive makes noise, isn't recognized, was formatted, or the file is very important and the other attempts failed. Turn the device off and don't open the drive.
Related content
More practical solutions in Computer.
Computer Freezing Frequently
Learn how to identify the main causes of computer freezes and discover measures to improve system stability and performance.
Computer Does Not Recognize USB: How to Fix It
Learn how to identify problems with USB ports, drivers, and devices when your computer does not recognize flash drives, keyboards, mice, or other accessories.
Mouse Not Working on PC: How to Fix It
Learn how to identify issues with USB and wireless mice, test connections, and fix common operational problems.
Sources
- Microsoft Support: Windows File Recovery
- Microsoft Support: Backup and restore with File History
- Microsoft Support: Restore files deleted from your OneDrive
- Google Drive Help: Recover a deleted file
- Apple Support: If you're missing files in iCloud Drive
- Mac User Guide: Restore items backed up with Time Machine
The screens in this guide are illustrations created by Fixfy to show the menu paths. Windows and OneDrive are trademarks of Microsoft; Mac, iCloud and Time Machine are trademarks of Apple Inc.; Google Drive is a trademark of Google LLC.