Windows’ Command-Line provides a reliable way to recover files from nearly all storage media, memory card, flash disk drive, HDD, SSD, pen drive and any other storage media without the use of software on your machine.
The next question that brings everything into perspective is:
How do you recover files with the command prompt? And can you use the command prompt to recover all lost data? Folks are asking the same question for command prompt data recovery.
To answer that correctly, we’ll check if there is any command-line available to execute the recovery.
Command prompt is one of the powerful and applicable Windows built-in utility that enables you to take full control of your computer and could get the work of data recovery done after any data loss-accidental deletion, virus attack, unintended storage formatting, and many more data loss scenarios.
With Command Prompt, you can troubleshoot many problems related to Windows, including hard drive recovery. It is the most powerful Windows-in-built utility which helps users to retrieve lost data.
Besides, this utility from Windows can help you build bad sectors on storage media and convert the RAW file system to NTFS. That's why if you accidentally lose your data you can directly use cmd to regain it.
But before we move ahead, let's dig a little deeper into the file structure to understand how cmd retrieves data.
A file consists of two parts:
When you delete a file, your system only removes the directory of the actual blocks, and if not overwritten or modified, the block still contains the data.
Therefore, the directory entries are marked available and are hidden from the operating system.
In such cases, you can quickly recover your lost data using the command prompt.
To recover files using cmd, from external drive, we'll use the attrib command.
This command applies to Deleted, lost, hidden, and even virus-infected file recovery.
It supports devices like Windows drive, external HDD, USB, SD card, and any other external storage media.
Note: Remain careful when you follow the command line. A tiny wrong typing error can result in serious problems.
A Step-by-Step Guide Recover Files from an External Drive using CMD
Step 1: Plug in your external storage media to your system.
Step 2: Head over to the start menu, and key in "cmd" in the search bar and hit the Enter key. This will open a pane on the left, showing the command prompt app.
Step 3: Right-click on the Command Prompt app and select "open as admin" to open the windows of cmd
Step 4: On the CMD command line, key in the following command:
attrib -h -r -s /s /d drive letter:\*.*"
For instance, attrib -h -r -s /s /d H:\*.*" if the drive you wish to recover is H. Replace H with the external drive letter of your external storage media.
Step 1: Press Windows +R keys simultaneously, and key-in cmd in the search box.
Step 2: in the command line, key in chkdsk G/f where G is the disk letter you desire to recover.
Step 3: Press Y until the command line starts again
Step 4: Again, enter the drive letter, for this case, G and hit the Enter key. The command line will go back to start.
Step 5: Enter the following command:
[G : \ >attrib –h –r –s /s /d *.*] (Replace G with your disk letter)
The command will retrieve all files in the drive.
-r stands for the Read-only attribute, which means files are readable but non-modifiable.
-s assigns "System" attribute of the selected multiple files
-h means hidden attributes for only selected files
/s indicates to search a particular path including subfolders
/d involves the process folder
After completion of the recovery process, you can create a new folder on the external drive with all recovered files.
The files might come in .chk format. Change the file extension and choose a preferred extension for each file.
This is applicable in recovering deleted files and Recycle Bin File recovery.
If you delete files from the recycle bin, you can either choose to Right-click files in the recycle bin or follow the command lines to restore them to their original location before emptying it.
Step 1: Head over to the Start menu and key-in cmd the search bar. Then hit Enter. This opens a window on the left of your screen.
Step 2: Click on the Command Prompt app from the listing of the programs to access its command line.
Step 3: Key in Start shell: recyclebinfolder on the command line and hit the enter button.
Step 4: Select the files you wish to recover.
Command Prompt ability to recover lost data is limited to a large extent, which means that you may not be able to recover all files using the CMD entirely.
When the CMD command line fails to restore your data, a data recovery tool can be the best alternative.
The only problem?
It is a world of data recovery software. Choosing the correct one can be difficult. So we scrape every corner of the web, executing the hard work for you--including assessing the feature that makes it outcompete its competitors in the data recovery world, to bring you one of the world's best data recovery tools--Recover It--right in front of you. Here is what the tool has to offer to you.
Step 1: Pick a recovery location
Select a target location to execute data recovery and recover files using command prompt. Next, hit the ‘Start’ button.
Step 2: Scan the location you've selected.
Hitting the Start button initiates the scanning process, which takes some time depending on file size.
Step 3: Preview and Recover
After the scan, hit the Preview button to confirm the file you wish to recover. Then hit the Recover button to get all your lost data back.
Nobody dreams of undergoing the data recovery process. In fact, everyone would do what it takes to keep data safe.
And that's what we're going to focus on. And some of the following measures may be helpful.
In the data world, there is nothing that can replace backup to prevent data loss and avoid money-intensive recovery. Backup means that you're keeping at least a copy of the original file, preferably not in the same disk media. And that isn't all, verify your backup frequently. It is a bad surprise to wait until disaster strikes only to find that your backup is corrupted.
While working with your computer, you must adopt healthy practices that can prevent major data loss scenarios, and in the worst-case scenario, will increase the chances of successful recovery.
Some malicious-ware and viruses can infect, delete, or modify your data secretly causing a computer crash and data loss at the same time.
To remedy this, you need a working antivirus and keep it up-to-date. Antivirus software is designed to protect systems from malware and other viruses that threaten your data. Viruses spread through the internet.
Software updates usually exist to patch invisible vulnerability—a vulnerability that can be a threat to your data. For safety purposes, keep your software up-to-date and shun the tendency of postponing updates and regularly check for pending software updates.
Get serious in protecting your hardware by keeping all network components in secure, air-conditioned with low foot traffic to prevent accidents.
What's more, keep and access your system in a place that deters theft, such as video security and 2FA-enabled entry.
Make use of data protection tools that can keep sensitive information out of the wrong hands. These include cloud disaster recovery solutions, firewalls, virtual private networks, antivirus software, and even more, which will go along protecting sensitive data from landing into the wrong hands.
Nothing is more painful than the instant it hits you that your valuable data has to get out of hand and has entered the world of data loss. In a spur of a moment, data that means all to you can disappear suddenly substituted by an excruciating feeling of dismay. But Windows understand such a situation happens. And they present a free method to recover deleted files using the cmd.
However, cmd data recovery has plenty of limitations—limitations that a data recovery software can easily overcome. And Recoverit presents free data recovery for the first 100 MBS without compromising anything—free recovery quality, and the process is similar to the pro version.