9sBlog

How to recover deleted files on Windows

Restore files from the Recycle Bin, OneDrive, or File History, then recover the rest with Microsoft's winfr tool, plus the one rule that saves your data.

A laptop open on a desk.

Deleted the wrong file, cleared out a folder, or lost data after a drive hiccup? Windows keeps several safety nets, and the right one depends on where the file went and whether any backup was running. Work through them from easiest to hardest, but do one thing before anything else: stop writing to the drive.

Stop using the drive immediately

This is the single rule that decides whether the rest of this article helps you. When you delete a file, Windows does not scrub it from the disk. As Microsoft’s Windows File Recovery documentation puts it, “the space used by a deleted file is marked as free space, which means the file data can still exist and be recovered. But any use of your computer can create files, which may over-write this free space at any time.”

Every write to that drive is a chance to land on top of the data you want back — installing a recovery app, saving a download, even the routine background activity Windows generates on its own. So the moment you notice a file is missing:

  • Save nothing new to that drive, and close apps that write to it.
  • If it is your system drive (usually C:), consider shutting the PC down until you have a plan, because Windows writes to C: constantly for temporary files and paging.
  • When you do run a recovery tool, install it and save whatever it recovers to a different drive — a USB stick or a second disk — never the one you are rescuing.

Where your file might still be

Four places are worth checking, in rough order of effort. Start at the top and only move down if the file is not there.

MethodRecovers whatDifficulty
Recycle BinFiles deleted normally from local drives, still in the binEasy
OneDrive recycle binFiles in synced folders, deleted within the retention windowEasy
File History / previous versionsEarlier copies — but only if it was turned on before the lossModerate
Windows File Recovery (winfr)Files emptied from the bin, or lost to formatting or corruptionAdvanced

Recycle Bin and OneDrive’s recycle bin

Most “deleted” files are not gone at all. Deleting something from a local drive moves it to the Recycle Bin, where it sits until you clear it. Open the Recycle Bin from the desktop — if you don’t see the icon, Microsoft’s Find the Recycle Bin guide shows how to add it back — select the file or folder, right-click, and choose Restore. It returns to the folder it came from.

Two habits send a file past the bin: pressing Shift+Delete, and emptying the bin, which is the same cleanup step people use to free up space on Windows 11. Once either happens, the Recycle Bin can’t help and you move down the ladder.

If the file lived in a OneDrive folder, check OneDrive’s own recycle bin, which is separate from the Windows one and survives even a wiped local disk. Sign in at the OneDrive website, open Recycle bin in the navigation pane, select the items, and choose Restore to send them back to their original location. The window is finite, and Microsoft documents it precisely: with a personal Microsoft account, “items in the recycle bin are automatically deleted 30 days after they’re put there”; with a work or school account, they are “deleted after 93 days, unless the administrator has changed the setting.”

File History and previous versions

File History is Windows’ built-in versioned backup, and it comes with one catch: it only helps if you turned it on before you lost the file. When it is running, it saves copies of your libraries — Documents, Pictures, Videos, Music, any custom libraries, and the Desktop — to an external drive or network location you pick, and keeps making regular copies over time.

If it was on, restoring is quick. Open File Explorer, go to the folder that used to hold the file, right-click it, and select Restore previous versions. Choose a version dated before the deletion, then select Restore, or expand that button and pick Restore to so the recovered copy lands somewhere else instead of overwriting anything current. The same right-click menu also rolls back a file you saved over by mistake, not just deletions.

To set it up so you have this option next time, follow Microsoft’s File History steps: connect an external drive, open Control Panel > System and Security > “Save backup copies of your files with File History,” select the drive, and choose Turn on. It is worth doing the day you finish reading this, because it is the difference between a two-click restore and the last-resort tool below.

Windows File Recovery (winfr) as a last resort

When a file is gone from every bin and you had no File History, Microsoft’s free Windows File Recovery tool can scan the raw drive for data that has not yet been overwritten. It is a command-line app you install from the Microsoft Store, and it runs on Windows 10 and Windows 11. It reads a source drive and writes what it finds to a separate destination — and Microsoft is firm that “the source and destination drives must be different,” which is the same overwrite rule from the top of this article, enforced.

Every command follows one shape: winfr source-drive: destination-drive: [/mode] [/switches]. There are two modes, and picking the right one matters.

ModeFile systemsBest for
RegularNTFSRecently deleted files on a healthy NTFS drive
ExtensiveNTFS, FAT, exFATOlder deletions, or after formatting or disk corruption; the only mode for FAT and exFAT

Add a /n switch to limit the search to a folder path or a filename pattern, which makes a scan far faster than combing the whole disk. Microsoft’s own examples show the pattern:

  • winfr C: E: /regular /n \Users\<username>\Documents\ recovers files from a Documents folder on C:, writing them to drive E:.
  • winfr E: C: /extensive /n *invoice* runs a deep scan of E: for anything with “invoice” in the name, saving results to C:.

winfr collects recovered files into a recovery folder it creates on the destination drive. Nothing here is guaranteed: the more the drive was used after the deletion, the less survives, which is exactly why the first step is to stop.

Recovery is always a race against how much the drive has been overwritten, and the odds fall the longer you keep working on it. That is why the dependable version of this problem is the one you solve in advance: a proper backup set up before anything goes wrong, so the next deleted file is a copy-back rather than a rescue. Turn on File History or a backup today, and the whole ladder above shrinks to a five-minute restore.

Discussion

    Leave a comment