Free Ways to Recover Deleted Files Using Command Prompt
What is command prompt?

In the process of using the computer, we should have encountered some command prompts, but few people know what these prompts mean. In fact, a command prompt is a working prompt for command input in an operating system. The command line is different from the graphical interface, it usually requires the user to memorize the commands to operate, so it’s kind of complex. It has many uses, but we often use it to retrieve data.
In the following article, I will give you three ways to tell you how to recover permanently deleted files using command prompt. You are able to understand command prompt more deeply through reading this post.
How to recover deleted files using attrib command
If you don’t want to recover deleted files without software, attrib command is a good choice. It can recover the files from USB, HDD, SD card and other external hard drives on account of virus attack and incorrect setting, but it may not be able to successfully restore the files you want.
Step 1. Enter “CMD” in search bar, and run it as Administrator
Step 2. Type “attrib -h -r -s /s /d C:*.*”. (replace C with the destination drive)

After inputting the attrib command line, wait for a while, you will find the restored file on your destination drive. By the way, its application is not extensive so you can try the next two methods.
Recover deleted files using Command Prompt in Windows File Recovery
Windows File Recovery is a software that uses the command line to recover data, which was issued by Microsoft in 2020, and it only supports Windows 10 and above. Windows File Recovery is a command line tool and needs to be executed through a command line script.
When using it, you need to figure out the command structure and then write the corresponding command line. Next, I will teach you how to recover deleted files by using cmd. You can get this software in Microsoft Store.

After installing, you should know the parameters you will use on the command line. Look at the table below:
Source drive | where you have lost your files |
Destination drive | the place that you store your recovered files |
Mode | regular & extensive |
Switch | narrow the scanning range |
File system | the way your disk uses to store and retrieve the data |
The command line structure goes like this: winfr source-drive: destination-drive: [/mode] [/switches]
Then, you choose the appropriate mode according to the file system.
You can refer to the table below:
File system | Scenarios | mode |
NTFS | Deleted recently | Regular |
NTFS | Deleted for a while | Extensive |
NTFS | Formatted disk | Extensive |
NTFS | Corrupted disk | Extensive |
FAT and exFAT | Any | Extensive |
Next, you have to choose an appropriate switch for your command line.
Switches | Meaning | Supported mode(s) |
/n | To filter the scan range: scans for a specific file with its file name/path/type, etc. | All |
/y: | Recovers system files. | NTFS / Segment |
/u | Recovers undeleted files, for example, from the Recycle Bin. | NTFS / Segment |
At last, enter the final command line into the computer through the command prompts of your choice, and after a while, your target file will be restored.
Recover files with an easier software WinfrGUI
In fact, it is more complicated to recover deleted files using command prompt, because many people do not understand the professional vocabulary of computers, which leads to many problems in the process of recovering files.
There is a more convenient freeware you can try. WinfrGUI is a user-friendly software that can recover files without entering complicated command lines, with just a few mouse clicks according to the graphical interface given. I believe you must be very interested, and WinfrGUI also fully invokes the functionality of Windows File Recovery, which is exactly the same as its use effect.
Now, I will show you how to use it. At first, you can install this freeware.
Step 1. Select the range to scan, and then choose a place to restore files.

Step 2. Choose the scan mode, and determine the file type in “Advanced settings”.

Step 3. Click the “Start Recovery” to complete the process.

As you can see, it is a more efficient software for recovering files, and at the same time, its safety factor is also very high.
Bottom line
It is indeed a good method to recover deleted files using command prompt, but not an easy one. In contrast, WinfrGUI uses a graphical interface to present the recovery process, which is more concise and easy to understand. You can choose the method that suits you according to your needs.