Recovering Data Since 1993

How to Recover Deleted Files Using Command Prompt?

Command Prompt can troubleshoot certain issues related to Windows including external hard drive recovery, memory cards and flash drives recovery. Being one of the most powerful inbuilt utility tool, it helps users to retrieve the files  lost due to accidental deletion, virus attack. Along with it, Command prompt repairs bad sectors on storage devices and convert Raw File System to NTFS for free. So if you have accidentally deleted or lost files, you can simply use Command prompt to recover it.

File Structure:

Before going further let’s understand the file structure first

A file consists of two parts:

A directory which consists the file name and the list of the blocks
✓ The actual blocks which contain the data

When a file is deleted, only the directory is removed whereas the actual block if not overwritten or modified, still contains the files. Thereby, the directory entries are marked ‘available’ and are hidden from the Operating System. In such cases, you can easily recover your lost files using the command prompt.

Recover your files using Command Prompt:

One of the most effective methods to recover deleted files from the external drive is through Command Prompt. Command Prompt executes commands to perform the assigned task. That said, there are some commands, which can recover your deleted files. They are as follows:

1. Recover files from your external drive

If you have accidentally deleted files from the storage drive such as hard drives, USB, flash sticks etc. Follow these commands in command prompt:

i. Press Windows key + R and in the search box, type CMD
ii. In the Command Prompt window, type chkdsk ‘drive letter’ /f and hit Enter.
For example: C : \ USERS\ PROGRAM FILES\ chkdsk D : /f
iii. Press Y until the command lines start again
iv. Type the drive letter again and hit Enter (The command line will go back to the start)
v. 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>)
Where,
–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

vi. 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

2. Restore files from Recycle Bin using Command Prompt:

When the Recycle Bin becomes full, Windows deletes files to make space for the newly deleted ones. However, these removed files are still recoverable until the Recycle Bin is emptied.

Follow these commands to restore files from Recycle Bin:

i. In the command prompt window, type: start shell:RecycleBinFolder and press Enter
For example: C:\> start shell:RecycleBinFolder
ii. Select the files and restore them

Recover files when command prompt does not help you

Even though you can recover deleted files through Command Prompt but the prerequisite is that you must be familiar with technical jargons. The reason being, you have to type in many commands and if you’re not familiar with the command lines, then it may seem complicated.

Furthermore, Command Prompt cannot recover files from a formatted storage drive, for that you need to leverage an external drive recovery software. Stellar Phoenix Windows Data Recovery – Home software can assist you in recovering your deleted files from the external drive hassle-free. It doesn’t require any familiarity with the command lines and is quite easy to use.

free download

Watch this video to see how easily Stellar Phoenix Windows Data Recovery – Home recovers lost or deleted data

 

Afterpiece

You can perform advanced administrative functions via Command Prompt. But you need to get familiar with each parameter and how they can be combined to achieve the desired result. Sometimes, the process gets complicated. On similar lines, recovering deleted files should be a simple and hassle-free process and that is when Stellar Phoenix Windows Data Recovery – Home rises to the occasion.

Comments(2)
  1. Genie Reddick December 19, 2017
    • Isha Rikhi December 21, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *