Technology, made understandable.Our approach
Data & privacyThe overwritten-file retrieval trail

Recover a file you accidentally replaced

Recover an overwritten file on Windows 11 using OneDrive history or an existing File History backup, preserve both versions, and check the recovered contents.

Keep the replacement while you look for the original

You copied a file into a folder, accepted Replace, and discovered that the file already there was the one you needed. Or you saved unwanted edits over a good document. The filename still exists, but its contents have changed. Recovery now depends on finding an earlier copy or revision.

This guide covers Windows 11, using OneDrive version history for a file stored there or an existing File History backup for a local file. Neither route can promise a version that was never captured. Start with the location where the accident happened; a folder called Documents does not, by itself, tell you which recovery system protects it.

Stop editing the affected file. Before restoring anything, preserve the replacement too: it might contain work you will want later. In File Explorer, select it and press Ctrl+C. Open a newly created recovery folder outside the affected folder, preferably on a separate drive, and press Ctrl+V. Open that copy to confirm its contents, then close it. Use a distinct folder name so another replacement prompt is unexpected.

If the application still has unsaved material you need, use its Save As or save-a-copy command to preserve that material under a different name before closing. Do not save a stale open document back over the file during recovery. Write down the affected file’s full location, the approximate accident time, and one detail that identifies the missing version.

Portable Samsung storage drive connected by cable to a laptop on a green chair.
Photo: Samsung Memory US / Unsplash · Unsplash License. Resized for display; some views use a crop. Illustrative photograph.

Follow the file’s location

Check File Explorer’s address bar for the actual folder path. If it is inside your OneDrive folder, begin with the web history below. If it is a local folder protected by File History, connect the backup drive you already used and take the second route. If both apply, check one at a time and keep recovered candidates separate.

For a hypothetical example, suppose you replaced proposal.docx at 14:20, and the missing draft included a delivery paragraph added at 13:50. A 14:25 revision may already contain the mistake; a 13:30 backup cannot contain that paragraph. Look for a candidate between those events, then read it. Dates narrow the search; they do not prove the contents.

If you cannot identify either history system, continue to the missing-history section. Turning on a backup now will not recreate yesterday’s file. Likewise, a second synchronized computer is only useful if it still holds the wanted contents; matching filenames are insufficient.

OneDrive: restore just the affected file

Microsoft documents version history for all file types, including photos and PDFs. Its current support page states a 30-day retention period and notes that an organization may disable versioning. Check promptly; the history actually available to your account determines what you can recover.

  1. Open OneDrive on the web and sign in to the account that owns the affected folder. Locate the file at that same folder path. Confirm its name and extension before selecting it.
  2. Select that single file, right-click it and choose Version history. Find the revision preceding the unwanted replacement. If the dates do not fit, stop and check the account, folder and filename again.
  3. Open the ellipsis menu beside the chosen revision and select Restore. The selected revision becomes current; the previously current revision moves into history.

Reopen the file and inspect the missing passage, image or worksheet. Before using the desktop copy, allow synchronization to finish and reopen it from its folder. Avoid saving an older application tab over the restored contents.

If you chose the wrong revision, revisit Version history and restore the appropriate entry, including the former current revision if needed. Keep your separate preserved copy until the result is checked.

File History: recover beside the working file

For an existing File History backup, use Microsoft’s previous-version recovery route. Keep the original destination intact while retrieving an older candidate.

  1. Connect the established backup drive or make its network destination available. In File Explorer, navigate to the real folder containing the affected file, rather than a library view.
  2. Right-click the containing folder and select Restore previous versions. The Previous Versions tab lists available dated copies. Select one from before the accident.
  3. Expand Open and choose Open in File History to inspect the saved contents. Find the required file and check that this backup predates the replacement.
  4. To recover the selected version without overwriting the live contents, expand Restore and choose Restore to.... Select a new, empty recovery destination outside the affected folder. If restoring a folder version, expect to retrieve that folder’s contents; locate your file inside afterward.

Microsoft warns that direct restoration over the current file or folder cannot be undone. Recovering elsewhere leaves the live copy available while you compare. If a replacement prompt appears despite using an empty destination, cancel and inspect the selected destination before proceeding.

When the list is empty or every candidate is wrong

An empty list is an absence of recoverable history through that route, not evidence that the document never existed. Recheck the exact path, account and backup connection. For a workplace file, ask IT whether retained organizational copies exist before changing permissions or backup settings.

Search places where you deliberately sent or exported the wanted contents: an email attachment, a dated project copy, an external backup, or a collaborator’s independently saved file. Copy candidates into the recovery folder under distinct names. An attachment from last week may recover most of the text while still missing this morning’s changes; describe that result as partial recovery.

A replacement is different from a straightforward deletion. You can check a recycle bin for a separately deleted original, but do not assume accepting Replace necessarily put the old contents there. Avoid spending the entire search on deleted-file recovery when the file still exists with unwanted contents.

Two broader controls are poor fits for one mistaken replacement. System Restore rolls back system configuration without affecting personal files; it does not provide this document’s missing revision. Restore your OneDrive can undo activity across the account for Microsoft 365 subscribers. That scope can affect unrelated files, so use the individual file’s history for this task.

Let the contents decide whether recovery succeeded

Open each recovered candidate directly from its recovery folder. Check the detail you recorded first, then inspect the rest: later pages, worksheet tabs, embedded pictures or the end of a recording. A familiar filename and a successful restore message do not establish that the wanted work returned.

Keep the recovered candidate and the preserved replacement until you have decided which material belongs in the working file. If each contains useful changes, make a third copy and combine those changes there. Name the chosen working version clearly and open it once more from its intended destination.

If no retained copy contains the missing contents, these history routes have reached their limit. Keep any partial recovery and record what needs rebuilding. After resolving the incident, check that your backup plan retains older revisions and that you can retrieve one without replacing your current work.

Sources, versions & scope

The steps describe the documented controls and expected checks; they are not a claim that every device or software release has been physically tested. Platform and version differences are stated with the procedure.

  1. Microsoft: Restore a previous version of a file stored in OneDrive
  2. Microsoft: Backup and restore with File History
  3. Microsoft: Restore your OneDrive
  4. Microsoft: System Restore
Share this guide