Whenever you accidentally delete an important file, it can feel awful beyond words, even if it’s for a few moments. A helpless feeling sweeps over you. After all, you have lost crucial data you have been working on for hours. All of your hard work just went down the drain just because of a moment’s mistake. Fortunately, Microsoft has introduced the new Windows File Recovery tool that will help you restore the deleted files using a few simple command lines. In this article, we will demonstrate how to restore data using the Windows File Recovery tool. Let’s dig in.
An Introduction to Windows File Recovery
Windows File Recovery is a command-based utility tool and it doesn’t have a graphical user interface like most Microsoft apps. Although we will show you how to use it in this guide, it’s still like one of those hands-on processes that would require you to go through practical experience to grasp all its functions completely. Please be aware that this tool needs you to have either Windows 11 OS or at the very least the May 2020 version of Windows 10 OS.
The effectiveness of this tool will depend on what kind of drive you have as your internal storage medium. Because, unlike hard disk drives that don’t overwrite deleted files immediately, the TRIM-enabled solid-state drives often wipe out most deleted files from their storage space almost immediately. Thus, you can restore data from SSD using the Windows File Recovery tool only if the deleted file hasn’t been overwritten from the storage device. Therefore, if you have lost data from a storage medium like an SD card or SSD, this tool might not be able to help you retrieve the data.
Even if you can retrieve data from an SSD, you might get a fraction of the data that has been deleted. After all, you cannot restore the files that aren’t present in the storage device anymore. We can’t really guarantee it. That’s why we always emphasize the importance of data backups. This tool has multiple modes to help you recover data efficiently depending on different file systems and situations. In this guide, we will explain the modes in detail and show you how to use them.
Installing Windows File Recovery
Before we even start explaining how to restore data using Windows File Recovery, you need to download and install it on your Windows PC from the Microsoft Store. You can either use the link we have provided here or just go to the Microsoft Store and search “Windows File Recovery.” Once you install the tool, you can access it by clicking on the “Search” icon in the taskbar and typing “Windows File Recovery” in it. After that, just click on the “Run as administrator” option in the left panel to open this tool.
What you will see is a command prompt window that has administrator access. Here, you will be running a specific set of commands designed to trigger the File Recovery tool and use it to restore lost files. You can also use PowerShell or Windows Terminal to use this tool. You just need to make sure that the PowerShell or the Terminal has administrator privileges.
Using WFR (Windows File Recovery)
When employing this tool, you must use the “winfr” command. You will also need to specify the drive you want to scan to find the lost file, as well as the destination folder or location where you want to save the recovered file. There are also multiple switches that will help you control how to perform a search and pinpoint the file you’re searching for. Here is the primary structure for the most basic command in Windows File Recovery:
winfr source-drive: destination-drive: /switches
Once you run the command, Windows File Recovery will create the “Recovery_[date and time]” directory on the destination drive of your choice.
Which Mode to Choose to Restore Data Using Windows File Recovery?
Before you start the recovery process, you need to determine in which mode you would like to start searching for the lost file. There are three different modes of search available in the Windows File Recovery tool. Here is a brief explanation of these modes:
- Default Mode: This is the fastest mode that is made to quickly search for any lost file.
- Segment Mode: This is similar to the Default mode. However, it searches for the lost files slowly to perform an in-depth scan of the source drive.
- Signature Mode: In this mode, the recovery tool will scan for the lost files by their file types and file groups, such as JPEG, PDF, DOCX, MP3, PNG, etc.
You would also need to confirm the file system of the source drive that you want to scan. To find out the exact file system of the source drive, follow these steps:
- Open the “File Explorer” window and go to “This PC.”
- Now, right-click on the drive (available under This PC) you want to scan and click on the “Properties” option.
- Click on the “General” tab and you will be able to see the file system of the drive that you want to scan with Windows File Recovery.
Using Recovery Modes of WFR
Now, let’s see how to utilize the different modes:
- If you’re trying to recover a file that has been recently deleted from a drive with the NTFS file system, use the Default mode.
- If the file you’re trying to recover is corrupted, deleted while formatting your computer, or it was simply deleted quite a while ago, you should be using the Segment mode as long as the source drive has NTFS file format. You can also run the Signature mode search on the drive after going through the Segment mode search.
- Are you looking to recover a file deleted from the drive with FAT, ReFS, or exFAT file system? In this case, go with the Signature mode. The first two modes will only work on a drive with an NTFS file system.
The rule of the thumb is to start with the Default mode if it’s not clear which mode you should start the search with. Consequently, if the Default mode doesn’t work, go with the Segment and Signature modes respectively.
1. Restore Files in Default Mode for WFR
You need to type the search path after the “/n” switch to start a scan in the Default mode. Here are a few things you need to understand before we continue:
Let’s say the name of the file you want to recover is “document.docx.” So, to start searching for the file, you would need to use the file name as the search path after the /n switch like this:
Here, document.docx is the search path. You can also use a full search path like this (Let’s assume that the username of the computer is Sam):
If you want to search for all the deleted files in the “Documents” folder on a computer in which the username is “Sam,” you need to use this:
If you know the file format of the deleted file but you don’t remember the exact file name, you can search for all the files of similar file format in a folder by using a “*” in the command line. For example, if you know that the file you’re looking for is a Word file with DOCX format, the file was located in the “Documents” folder, and the username of the computer is “Sam,” then you would need to use this search path after the /n switch:
Now, you have learned about the search path, so let’s put everything together. To scan for all the DOCX files in the C: drive and copy them into the D: drive, run this command:
winfr C: D: /n *.docx
After the primary scan is complete, the Windows File Recovery tool will ask if you would like to continue. To answer this, type the “y” command.
And just like we have mentioned earlier, the recovered files will be saved in the D: drive with the “Recovery_[date and time]” directory name. For example, if you recovered the file on July 2nd, 2022 at 1:30 PM, the directory name will look like this: Recovery_20220702_133000
To recover every file with a specific word in their file names, you should use the “*” command. For example, if you want to recover all files with the “assignment” word in their file names, use this command line:
winfr C: D: /n *assignment*
You can also search for multiple types of files with multiple /n switches at once. For example, if you want to recover all Word, Excel, and PowerPoint files at once, use this command line in the Windows File Recovery tool:
winfr C: D: /n *.docx /n *.xlsx /n *.pptx
You can also recover a single specific file as long as you are aware of its file name. For example, if you want to recover a file named “important_assignments.pdf” from the C: drive and save it to the D: drive, use this command:
winfr C: D: /n \Users\Sam\Documents\important_assignments.pdf
Here, we have assumed that the username of the computer is Sam. And the file was previously located in the “Documents” folder before it was deleted from your computer.
2. Recover a File in Segment Mode
As we have mentioned before, the way Segment mode works are almost similar to the Default mode. If you want to use this mode, you just have to add the “/r” switch in addition to the “/n” switch while typing the command line. In other words, the structure of the command lines of the Segment mode is the same as the Default mode. All you have to do is add the “/r” switch before the “/n” switch.
For example, if you want to recover all the deleted DOCX files from your C: drive and restore them in the D: drive, you need to execute this command line:
winfr C: D: /r /n *.docx
Therefore, if you’re unable to recover the file you’re looking for using the Default mode, just add the “/r” switch and search for the file again in the Segment mode.
3. Restore Data Using Windows File Recovery in Signature Mode
The Signature mode is a bit different from the Default and Segment ones. This mode scans for the deleted files according to a certain set of file types. So, the file you’re looking to recover has to have a file type that the Signature mode supports. While using the Signature mode, you need to use the “/x” switch to specify that you will be using the Signature mode, and use the “y:” switch to specify a group of file types that you would like to perform the scan for.
According to Microsoft’s documentation, the Signature mode supports these file types and groups:
|File Groups||File Types/Formats|
|ASF||wma, wmv, asf|
|JPEG||jpg, jpeg, jpe, jif, jfif, jfi|
|MPEG||mpeg, mp4, m4a, mpg, m4b, m4r, m4v, 3gp, mov, qt|
|ZIP||zip, docx, xlsx, pptx, odt, ods, odp, odg, odi, odf, odc, odm, ott, otg, otp, ots, otc, oti, otf, oth|
If you ever want to reread the supported file groups and file types, you can do a quick check by using this command in the Windows File Recovery tool:
Now, let’s see how to structure the command lines to perform a search using the Signature mode.
Imagine that you want to search the C: drive for images of JPG file format, and save the recovered files in the D: drive. Now, from the column above, you can see that the images of JPG file type or format belong to the JPEG file group. So, to perform the search in Signature mode, you need to execute the following command line:
winfr C: D: /x /y:JPEG
You can also search for multiple file types belonging to different file groups at once. For example, let’s say you want to recover the deleted files of JPEG, MP3, and DOCX formats. The files were located in the C: drive before deletion and you want to save them in the E: drive. The command line to perform the search in the Signature mode would look like this:
winfr C: E: /x /y:JPEG,MP3,ZIP
Learn More About Windows File Recovery
If you want to learn about the Windows File Recovery tool in more detail and want an in-depth understanding of every complex command, please go to the aforementioned official documentation page of the Windows File Recovery tool. If you want to check the basic commands, execute the “winfr” or “winfr /? commands after opening the tool. Want to check the advanced options? Run this command: winfr /!