Deleted It by Accident? winfr Gets It Back

Microsoft's free command-line rescue tool brings back deleted files, as long as you pick the right mode and stop writing to the drive.

FREE$34.95UpdateStar PremiumShare a link to claimShift+Delete. One reflexive keystroke, and the folder with three months of invoices skips the Recycle Bin and vanishes. Your stomach drops, your hand hovers over the mouse, and the first instinct is to start downloading every recovery tool the internet suggests. Stop right there. Every byte you write to that drive now could land exactly where your lost files still sit.

Microsoft has a free answer sitting in the Microsoft Store: Windows File Recovery, better known by its command name, winfr. It has no buttons and no wizard, just a Command Prompt window. That sounds scary, but the commands are short, and this guide walks you through every one you need.

Step 1: Freeze the crime scene

When Windows deletes a file, it only marks the space as free. The data stays there until something else overwrites it. So the less you do on the affected drive, the better your odds.

  1. Close programs that save in the background, such as cloud sync clients or download managers.
  2. Don't install anything new onto the drive you lost files from.
  3. Grab a USB stick or external drive with enough free space for the recovered files. winfr refuses to restore to the same drive it scans, and that rule protects you.

SSD owners need to move fast. Solid-state drives clean up freed space on their own (that's the TRIM feature at work), so deleted data on an SSD can disappear much sooner than on a classic hard drive. If the file was on an SSD and days have passed, keep your expectations modest.

Step 2: Install and launch winfr

Windows File Recovery works on Windows 10 (version 2004 or later) and Windows 11.

  1. Open the Microsoft Store, search for Windows File Recovery and install it. The app is small, but it still lands on your system drive, so the smartest move is installing it before you ever need it.
  2. Press the Windows key, type Windows File Recovery and open it.
  3. Confirm the prompt that asks whether the app may make changes to your device.

A Command Prompt window opens with the usage help. Everything from here happens in that window.

Step 3: Pick the right mode

The basic syntax is always the same: winfr source-drive: destination-drive: [/mode] [/switches]. The mode decides how deep winfr digs, and the right choice depends on the file system. To check yours, right-click the drive in File Explorer and choose Properties.

  1. NTFS drive (most internal disks and larger external drives), file deleted recently: use /regular.
  2. NTFS drive, file deleted a while ago, drive formatted or corrupted: use /extensive.
  3. FAT or exFAT (SD cards, smaller USB sticks): always use /extensive.

If you're not sure, Microsoft's own advice is to start with Regular. It's quicker, and if it comes back empty-handed, Extensive is your second attempt.

Windows File Recovery help screen in Command Prompt with the regular and extensive modes and the /n filter switch highlighted The built-in help (shown here from an older build) lists both modes and the /n filter.

Step 4: Aim with filters instead of scanning everything

Running winfr on a whole drive without a filter is a bad idea, especially on C:. You'll get thousands of system leftovers along with your files. The /n switch narrows the search by folder, file name or wildcard, and you can stack several of them.

Recover your Documents folder from C: to the drive E::

winfr C: E: /regular /n \Users\<username>\Documents\

Recover only PDFs and Word files:

winfr C: E: /regular /n *.pdf /n *.docx

Hunt down anything with "invoice" in its name on an SD card that shows up as E:, saving to C::

winfr E: C: /extensive /n *invoice*

Three rules keep filters working. Replace <username> with your real Windows user folder name. End folder paths with a backslash. And wrap any path that contains spaces in quotes, like /n "\Users\<username>\Documents\Quarterly Statement.docx".

Step 5: Run it and let it work

Type your command, press Enter, and answer the confirmation prompt. Then be patient. Regular mode on a filtered folder can finish quickly, while Extensive mode on a big drive can take a long time. If you need to cancel, press Ctrl+C.

Should the destination drive fill up mid-scan, winfr pauses and lets you free space and resume, skip the file or abort. That's another reason to use a roomy external drive from the start.

Step 6: Check what came back

On the destination drive, winfr creates a folder named Recovery_ followed by the date and time. Open it and look through the results.

Some files may show up with odd names. Items rescued from the Recycle Bin, or permanently deleted from it, can appear as $files.xxx entries inside a $RECYCLE.BIN folder. Open them one by one with the right program, and rename the good ones.

If a file opens but looks garbled, parts of it were already overwritten. Try the same command again with /extensive instead of /regular; the deeper scan sometimes finds an intact copy.

Trick: the advanced switches

Type winfr /! to see the advanced help. A few switches are worth knowing:

  1. /a skips all confirmation prompts, handy if you script the recovery.
  2. /o:b keeps both versions when a file with the same name already exists in the destination (/o:a always overwrites, /o:n never does).
  3. /k recovers system files, which winfr leaves out by default.
  4. /e turns off the default filter that hides certain system and program file types, such as .dll and .exe.

The last three only work in the advanced NTFS and segment modes, so stick to the basic commands unless the standard scans fail.

What winfr can't do

It works on local drives only: internal disks, external drives and USB devices. Cloud storage and network shares are off the table, so for files deleted from OneDrive or Dropbox, check the service's own online recycle bin first. And if you'd rather click than type, Recuva does a similar job with a graphical interface.

Our verdict

winfr is ideal for anyone who just lost a document, photo folder or spreadsheet on a local drive and doesn't want to pay for recovery software. It's free, it's from Microsoft, and the filters keep results manageable once you get past the command line. The one thing to do today, before anything goes wrong: install it now, and keep a spare USB drive in your desk drawer as a recovery target.

Related on UpdateStar

about author