How to Restore an Overwritten File
In this article
Accidentally saving over a file is a common and stressful mistake, but in most cases the old version can be recovered. This guide walks through the practical methods to restore a previous version of an overwritten file on Windows, macOS, and popular cloud services. You'll need access to the computer where the file is stored and, for cloud-based recovery, an internet connection. Start with the method that matches your situation, and if the first attempt doesn't work, move to the next.
What You'll Need
- The computer where the file was overwritten (or access to the cloud account if the file is stored online).
- Administrator or owner permissions on that computer or account.
- An internet connection if the file is in a cloud service like Google Drive, OneDrive, or Dropbox.
- File Explorer (Windows) or Finder (macOS) for local recovery.
Step-by-Step
- Check the cloud service's version history first. If the file is in Google Drive, right-click the file and select "Version history" then "See version history." In OneDrive, right-click the file and choose "Version history." In Dropbox, click the file and select "Version history" from the menu. Browse the list of versions, find the one from before the overwrite, and click "Restore" or "Download."
- Use File History on Windows. If the file is stored locally on Windows and you have File History enabled, right-click the file in File Explorer, select "Properties," go to the "Previous Versions" tab, and choose a version from before the overwrite. Click "Restore" to put it back in its original location, or "Copy…" to save it elsewhere.
- Use Time Machine on macOS. If you're on a Mac with Time Machine set up, open the folder containing the file, then enter Time Machine (from the menu bar or by clicking the Time Machine icon). Scroll back in time until you see the version you want, select it, and click "Restore."
- Look for temporary or autosave files. Many applications create temporary copies. In Microsoft Office, open the app and go to File > Info > Manage Document (or Manage Versions) and look for "Recover Unsaved Documents." In Google Docs, the version history is built-in (File > Version history). In Adobe Photoshop, check the "Auto Recover" folder (usually in the same folder as the original or in a temp directory) for files with a .psb or .psd extension.
- Check the Recycle Bin or Trash. If the overwrite was actually a delete-and-replace (e.g., you saved a new file with the same name after deleting the old one), the old file might be in the Recycle Bin (Windows) or Trash (macOS). Open it and restore the file if present.
- Use a file recovery tool. If the above methods fail and the file was stored locally on a hard drive or SSD, you can try a data recovery program. These tools scan the disk for remnants of deleted files. Stop using the drive immediately to avoid overwriting the data. Install the recovery tool on a different drive if possible. Popular options include Recuva (Windows), TestDisk (cross-platform), and PhotoRec (cross-platform). Run the scan and look for the file name or file type.
- Restore from a system backup. If you have a full system backup (e.g., Windows Backup and Restore, macOS Time Machine, or a third-party tool), restore the entire backup to a point before the overwrite, or mount the backup and copy the specific file.
Common Mistakes
- Continuing to use the drive after overwriting. Every new file written to the same disk can overwrite the data you're trying to recover. Stop using the computer as soon as you realize the mistake.
- Ignoring version history in cloud apps. Many people forget that Google Docs, Sheets, and Slides keep every revision automatically. Always check there first.
- Restoring the wrong version. When you see a list of versions, check the timestamp carefully. Restoring a version that is too old could lose recent work.
- Not checking the Recycle Bin/Trash. Some overwrites happen after a delete, and the old file may still be in the trash.
Tips
- Enable versioning in your cloud storage. Google Drive, OneDrive, and Dropbox keep version history by default, but make sure you're signed in and syncing.
- Turn on File History (Windows) or Time Machine (macOS). These built-in tools automatically keep previous versions of files. Set them up before you need them.
- Use "Save As" instead of "Save" when making major changes. This creates a new file, leaving the original untouched.
- Keep a separate backup. An external drive or a second cloud service gives you a safety net beyond version history.
- Act quickly. The sooner you attempt recovery, the higher the chance of success, especially for local files.
Troubleshooting
- Version history is empty or doesn't show the old version. This can happen if the file was created after the version you need, or if versioning was disabled. Try the next method, such as checking autosave or using a recovery tool.
- File History or Time Machine isn't enabled. You can't recover from a backup that doesn't exist. Move to the recovery tool method or check if the application itself has a backup (e.g., Office's AutoRecover).
- The recovery tool doesn't find the file. The data may have been overwritten already. Try a deeper scan or a different tool. If the drive is an SSD, recovery is harder because of wear-leveling; you may need professional data recovery services.
- You restored a version but it's still the wrong one. Double-check the timestamp and try another version. If the file is in the cloud, the restore may take a few minutes to propagate.
- You can't find the file at all. Search your entire drive for the file name or use the recovery tool's search by file type. Also check if the file was moved to a different folder during the overwrite.
Frequently Asked Questions
Can I recover an overwritten file if I don't have backups or version history?
It's possible but not guaranteed. You can try a file recovery tool that scans for deleted data, but if the disk has been written to since the overwrite, the old data may be gone.
Does Google Drive keep versions of files I overwrite?
Yes, for files created in Google Docs, Sheets, Slides, and Drawings, Google keeps a full version history. For other file types (e.g., PDFs, images), it keeps versions for 30 days if you upload a new file with the same name.
How long does Windows keep previous versions of files?
It depends on the method. File History keeps versions as long as there's space on the backup drive. System Restore points are kept until the disk space is needed, usually a few weeks.
Will restoring an old version delete my newer changes?
Yes, restoring a previous version replaces the current file with the older one. To avoid losing newer changes, save a copy of the current version first.
Can I recover an overwritten file from an SSD?
It's harder than on a hard drive because SSDs use wear-leveling and TRIM, which can quickly erase old data. Try recovery tools immediately, but success is not guaranteed.
What if the file was overwritten on a network drive or server?
Check if the server has its own versioning (like Windows Server's Volume Shadow Copy) or ask the administrator. Cloud-based network drives often have version history as well.