How to recover deleted files from external hard drive using CMD

If I want to recover files from Windows PC including Windows 10, 8.1/8, 7, Vista and XP using only command prompt, what should I do under such circumstances?

Table of Contents

  • Situation analysis
  • What is command line?
  • Step by step deleted file recovery introductions

lost mind after deleted files
Deleted important files by mistake

As general people would wonder, can I recover files/data from external hard drive without any other software? The answer is always yes, And I am sure many of you have being figuring how, below is an example of how hard drive failure could affect someone’s life.

“I have a habit of backing up all my work files to my company hard drive. One day the power went off without any sign, so I guess what happened next was the files got lost, and I need a solution. All those important documents are stored on it. Quite a disaster I would say somehow tragic.”


>> 100% Safe Hard Drive Deleted File Recovery Software Download

To recover deleted files in an eaiser way? Download easy to use data recovery software which is designed for such situation.

Command Line for Windows XP/Vista/7/8/10

Windows 7 deleted file recovery
Recover deleted files in Windows

Command Prompt, also known as cmd.exe or cmd (after its executable file name), is the command-line interpreter on Windows NT, Windows CE, OS/2 and eComStation operating systems. It is the counterpart of COMMAND.COM in DOS and Windows 9x systems (where it is also called "MS-DOS Prompt"), and analogous to the Unix shells used on Unix-like systems. The initial version of Command Prompt for Windows NT was developed by Therese Stowell. Re: See wiki

CMD is a program launched on windows operating system. It varies its instruction into the command box in order to run certain program. You can either find CMD from the menu bar or run it directly through “Run”

  • Click "Start" button > "Run" > type "cmd.exe" and press Enter button
  • Go to "Start" button > "Programs" > "Accessories" > "Command Prompt" (Windows XP)
  • Go to "Start" menu > type "command prompt" to show this command and then click it (Windows 7, 8, 8.1 and 10)
  • Select "My Computer" on desktop, C: > Windows > system32 > cmd.exe to create a command prompt shortcut

Step by step introductions

command prompt line
Command prompt line

  • Press Windows key + R and in the search box, type CMD
  • . In the Command Prompt window, type chkdsk ‘drive letter’ /f and hit Enter.
    For example: C : \ USERS\ PROGRAM FILES\ chkdsk D : /f
  •  Press Y until the command lines start again
  •  Type the drive letter again and hit Enter (The command line will go back to the start)
  •  Now, type [drive letter : \ >attrib –h –r –s /s /d *.*]. This command will recover all the files in the storage drive (attrib -r -s drive:\<path>\<foldername>)

chkdsk cmd recover files
CHKDSK command prompt to recover deleted files

–r is Read-only attribute: Files are readable and cannot be changed
–s assigns ‘System’ attribute to the selected files
–h command assigns the ‘Hidden’ attribute to the selected files
‘/S’ implies to search the specified path including subfolders
‘/D’ command includes process folders

Bottom Line

Once the process is complete, a new folder is created on your external drive with all the recovered files. Probably, the files will be in .CHK format. Change the file format and save the files at the preferred location

Easier solution: Use iCare Recovery to recover deleted files from external hd with simple steps

Download iCare Data Recovery if the CMD failed to work for you.

Step one: Select 'Deep Scan Recovery' to start recovery and wait for the drive to be scanned.

select recovery

Step two: select deleted files to save them.

recover files

download data recovery software

Article updated on 12/01/2018

Related Articles

Hot Articles

Previous: hard drive crashed while clone

Next: Recover deleted files from external hard drive after format

Data Recovery Tool > How to recover deleted files from external hard drive using CMD