> How to > Data Recovery Solution > Command Prompt for Data Recovery

Command Prompt for Data Recovery

Updated on Oct 18, 2018 by Jean to Data Recovery Solution

Summary

This page includes all command prompt for data recovery you greatly concerned. Using command line or cmd to recover files from memory card, hard disk or USB pen drive provides a free way to recover permanently deleted files without software on Windows PC or laptop. Of course, if you prefer an easier yet more effective way of computer data recovery, EaseUS Data Recovery Wizard is an ideal choice.

Overview of Command Prompt for Data Recovery

Can you use the command prompt to recover every lost or deleted file from computer hard drive, external HDD, memory card, flash drive or pen drive? So many people are asking the same help for command prompt for data recovery, but is there command line available?

Though there are great data recovery tools online which are developed to recover all types of files from various storage media on Windows 10, 8.1, 8, 7, Vista and XP, it's still required for a personalized way to find lost files back. Being one of the most powerful and applicable inbuilt Windows utility that enables users to take a full control of their computer, command prompt might do people a favor in terms of retrieving files after accidental deletion, formatting or virus infection.

All Data Recovery Command Line Available to Use

Command prompt's ability in recovering deleted files is restricted to a large extent, and in the following, you're going to learn all data recovery command line that is available to use for some specific situations of data recovery needs, including recover files from virus infected hard drive, recover files from corrupted drive with bad sectors and recover inaccessible files from RAW drive.

How to recover virus infected files using attrib command?

1. Plug in your hard drive, memory card or USB drive to your computer

2. Go to the start menu, type in "cmd" in a search bar, hit enter and then you can see something named "cmd. exe" under a list of programs.

type cmd and open command prompt in Windows

3. Right click "cmd. exe" and then you will get the command windows that allows you to recover virus infected files. Type in "attrib -h -r -s /s /d drive letter:\*.*", for example, "attrib -h -r -s /s /d G:\*.*".

recover virus infected files with attrib command

How to recover files from bad sectors using chkdsk command?

1. Following the same way to open the command prompt in Windows.

2. On the command window, type in "chkdsk drive letter: /r/f" (e.g. chkdsk d: /r/f).

recover files using chkdsk command

How to recover files from RAW drive using the diskpart command?

1. Following the same way to open the command prompt in Windows.

2. On the command prompt window, type diskpart and then hit on Enter.

3. Type Rescan and then hit enter.

recover files using diskpart command

Data Recovery Software for Many More Data Recovery Needs

Out of the command line data recovery, actually, there are many more data recovery needs. For example, recover deleted files, undelete files, recover photos from the formatted hard drive, unformat hard drive, etc. Since command prompt will no longer help in such data loss situations, you need an alternative CMD data recovery utility which called EaseUS Data Recovery Wizard.

It's all-in-one free file recovery software that can fully replace the function of command prompt data recovery, in addition, provides more advanced data recovery solutions such as partition recovery, deleted file recovery, formatted hard drive recovery, etc.

To recover files when command prompt for data recovery cannot help, do as follows:

1. Download and install EaseUS Data Recovery Wizard on your computer.

2. Use the data recovery tool to search for and recover your lost data.

  • Choose a storage location or a specific folder where your data was lost and then click the Scan button.
select a location and click scan
  • When the scan is complete, locate the recoverable files or folders from the list of scan results.
scan lost data
  • Select files and then click the Recover button. When choosing a location to save the recovered data, you should not use the original drive.
select wanted data and click recover