Accidentally deleting a file can be a nightmare. A new Windows 10 recovery tool, Windows File Recovery, can help—though it’s geared towards those who don’t mind using a command-line interface.
Windows File Recovery, a free Microsoft app now on the Windows Store, offers a way to restore files that have become accidentally deleted. It does require Windows 10 build 19041 or higher, however, and also doesn’t work on a file that’s been stored to the cloud. You’ll also need two separate drives, which can be as simple as a USB drive if you’re trying to recover a file from the boot disk.
The app is essentially a command-line interface disguised as an app, so recovering a file is a strictly text-based affair. Microsoft automatically creates a recovery folder for you called Recovery_<date and time> on the destination drive. The basis interface looks like this:
winfr source-drive: destination-drive: [/switches]
Microsoft provides some additional examples. For example, here’s how to recover JPEG and PNG photos from your Pictures folder to the recovery folder on an E: drive.
winfr C: E: /n UsersPictures*.JPEG /n UsersPictures*.PNG
Those examples use what Microsoft calls the Default mode for the Windows File Recovery interface. There are two others: Segment mode and Signature mode. Default mode uses the Master File Table (MFT) to locate lost files. (The MFT stores the information required to retrieve files from an NTFS partition.) If the MFT is missing or corrupted, you can use Segment mode, which requires segments: summaries of file information that NTFS stores in the MFT such as name, date, size, type and the cluster/allocation unit index. Signature mode searches for file types. such as .PDF or PNG files. If you’re searching an external drive, only Signature mode can be used, Microsoft says.
If you’ve lost a file, Microsoft specifically recommends not using your PC until the Windows File Recovery utility can be run. “In the Windows file system, 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,” Microsoft said in a list of frequently asked questions about the MFR app.