Reading Time: 6 minutesUnintentionally deleted files can be problematic since it may not be immediately clear how these files can be recovered. However, there are methods for recovering these files. One way of doing this in Windows 10 is using the command prompt.
What is the Command Prompt in Windows
The command prompt is a text-based, command-line interpreter for Windows. It is used to execute commands which can be used to open programs, automate tasks, run scripts, and even fix Windows issues.
NB: To carry out more advanced tasks with the command prompt you will have to run it with administrator privileges.
How to Recover Deleted Files on Windows 10 Using Command Prompt
The simplest way to retrieve a deleted file is to recover it from the Recycle Bin if it has not been permanently deleted yet. It is also possible to recover ‘permanently’ deleted files using the command prompt in Windows 10. Even if a file is deleted from the Windows recycle bin, it is usually still on the device’s storage medium.
The operating system earmarks the space that the file is taking up for overwriting, giving users a period of time during which they can recover files. If you act quickly, files can be recovered using a few methods including using the command prompt. Third-party software can also be used as an alternative as we will see below.
Recovering Files From The Recycle Bin Using the Command Prompt
To recover files from the Recycle Bin via the command prompt, open the command prompt with administrative privileges. This can be done by opening the Windows taskbar, searching for Command Prompt and then right-clicking on the command prompt icon and selecting Run as administrator.
Users can run the following command to open the Recycle Bin:
The items can then be recovered by selecting them and then clicking on Restore the selected items.
Recovering Deleted Files Using the Windows File Recovery
The most effective way to recover deleted files on Windows 10 using the command prompt is by using the command-line based Windows File Recovery app. Here is how to use the app:
Step 1: After downloading the app from the Windows Store, launch it. The app will ask to be allowed to make changes to your device. Grant these permissions.
Step 2: Open the Windows start menu, then search for the Windows File Recovery app.
Step 3: You can now recover files using a command in this format:
winfr source-drive: destination-drive: [/mode] [/switches]
The 2 basic modes that can be used to recover files are Regular and Extensive. For example, if you wanted to recover files from your Documents folder, you would type the following:
winfr C: E: /regular /n \Users\<username>\Documents\
In the command above, the source drive is the C drive, while the destination drive is the E drive. If you were to run this command, you would have to substitute for the drives that apply in your case. This means, that you would also have to replace <username> in the example above with your computer’s username.
Note that the destination drive must be different from the source drive or else the process won’t work.
Step 4: When prompted for confirmation to continue, simply press Y to start the recovery operation. If you need to stop the recovery process for any reason, simply press Ctrl + C.
Step 5: You can now browse your destination drive for the files you were trying to recover. They will be in a folder that has a name beginning with Recovery.
You can repeat the method described above using the extensive mode. A full list of all modes and switches can be viewed on Microsoft’s website. Regular mode is the standard recovery mode for drives that aren’t corrupted, while extensive is a more thorough recovery option that is suitable for all file systems.
Recovering Deleted Files Using Disk Drill
While using the command-line tool Windows File Recovery is an effective option, not everyone will be comfortable with the command-line interface. As a command prompt recovery alternative, the best option is to use an app with a graphical user interface (GUI) such as Disk Drill.
Disk Drill is easy to use but still offers users professional-level features and functionality. This sets it apart as one of the best Windows file recovery applications. To recover files with Disk Drill on Windows, follow these steps:
Step 1. Download and install Disk Drill on your computer.
After the installation process is done, you will be asked by Windows’ User Account Control to grant Disk Drill admin permissions. Doing this will allow Disk Drill to run its advanced data recovery algorithms. On opening Disk Drill, you will have to choose the drive that you want to recover files from. Do this, and then select All Recovery Methods. This will allow you to recover as many files as possible.
Step 2. Select Search for lost data to start the search process.
Step 3. You can now browse through a list of recoverable files to see if the files you are looking for were discovered.
Browse through the list of files and select the ones that you want to recover. You can select the category of file that best corresponds to what you’re looking for. You can choose options such as Documents and Audio to help narrow your search.
Step 4. You will now need to save the files that you want to recover.
It is advisable to save these files to a different storage device. Doing this ensures that you don’t overwrite the very files that you are trying to recover. A confirmation message will be displayed letting you know if recovery was successful or not.
Even if you think that your file is permanently deleted, this is not the case. Users can make use of data recovery tools from the command prompt or even tools that have a GUI to try to recover files. As far as the command prompt goes, using Windows File Recovery from the command prompt is your best bet for file recovery. Otherwise, a third-party tool like Disk Drill with a GUI is a solid alternative.