How to Recover Deleted Files Using Command Prompt? Tricks!
Are you looking for a solution to recover deleted files using Command Prompt? If yes, then don’t worry, just read this blog to know the manual and professional solution.
Command Prompt is the default program, which is used to run various applications by using different commands. It can also resolve issues related to Windows, including external drives, Memory Cards, and Flash Drives. It is an alternate way to execute the software. Most of the users tend to use the latest way to run the software on their system, but they never stay away from executing the application using Command Prompt. So, it also helps users to retrieve lost files using command prompts, which are lost due to accidental deletion, virus attacks, etc.
How to Recover Lost Files Using Command Prompt? – Users Queries!
Consider the below-given real-time example, where one of the users has deleted files and wants to know how to recover deleted files using command prompt.
“Hello, friends..! I got stuck in a big problem, as my carelessness had cost me a lot. Yesterday, I accidentally deleted some of the most important files. The files that I deleted are very important to me and I need them very much for my work. So I want to restore deleted files using the Command Prompt. To do so, I am searching for software to recover deleted files using Command Prompt and access deleted files again on my computer system. Please help me to recover my deleted files.”
“Hello, My name is Jack Miler, and I am a shopkeeper. I used the external hard disk to store my important documents. Last night, I deleted some files accidentally. Now I want to know how to restore deleted files using the command prompt.”
“Is anyone available here to help me? My son deleted data from the hard drive, and I want a free solution to get lost files back without using the software. I heard about the attrib command but don’t know how to use it. Please suggest me solution to recover deleted files using the command prompt.”
Many users have faced the same problem as this. So, this article will surely help users find a way to recover lost files using the command prompt. Before going further, first understand the file structure. A file has two parts:
- File directory, which contains the file name and the list of blocks
- The actual blocks which contain the contents or data
When any file is deleted, only the directory is removed, whereas the actual block still contains the data. Thus, the directory records are marked “available” and are invisible to the operating system. In such situations, users can easily recover deleted files using the command prompt.
Methods to Restore Deleted Files from Command Prompt
The command prompt is one of the most impressive methods to recover lost or deleted files from hard drive. The command prompt executes several different commands to perform the recovery task. So, there are some commands given below that can recover lost files using the command prompt:
Before executing the attrib command to retrieve deleted files. Make sure you are using the right command. Because a wrong step will lead you to a serious problem. Also, the CMD commands are written in the scripting language. So, you have to follow the complete command without any change.
Retrieve Deleted Hard drive Files Using Attrib Command on CMD
If a user has accidentally deleted files from the storage drive, such as USB, flash sticks, hard drives, etc. Then, to perform recovery, follow these commands at the command prompt:
- First of all, press Windows key + R and type CMD in the search box
- After that, in the Command Prompt window, type chkdsk “drive letter”andd& press Enter key
For example: C: \ USERS\ PROGRAM FILES\ chkdsk D: /f - Now, press Y key until the command lines start again
- Then, again, type the drive letter and press the Enter key. Then, the command line will go back to the beginning.
- Now, type drive letter: \ >attrib –h –r –s /s /d *.*. This command will recover all the lost files in the storage drive
Where,- is Read-only attribute: Files are readable and cannot be changed.
- -s is the ‘System’ attribute to the selected files.
- -h assigns the ‘Hidden’ attribute to the selected files.
- ‘/S’ assigns to search the specified path, including subfolders.
- ‘/D’ command includes process folders.
Finally, when the recovery process is completed, then a new folder is created on your external drive with all the recovered files. Most probably, the files will be in CHK format. Now, change the file format & save the files at the desired location on your system.
Recover Deleted Files from Recycle Bin Using Command Prompt
In some situations, where the recycle bin becomes full, then Windows will delete the files to make space for the recently deleted files. However, these removed files are still recoverable until the recycle bin is emptied.
To recover deleted files using the command prompt, follow these commands:
- First of all, in the command prompt window, type the command start shell:RecycleBinFolder & press Enter key
For example: C:\> start shell:RecycleBinFolder - Finally, choose the files and recover them.
Note: What if the attrib command fails to recover deleted files? In such a situation, you need a powerful way to get deleted files back from the hard disk. Move to the below section and learn the easiest way to retrieve permanently deleted data from a hard drive.
Retrieve Lost Files When the Command Prompt Does Not Help You
Even though users can restore deleted files through the command prompt, sometimes users are not very aware of the commands and are also not very familiar with CMD commands. Also, the command prompt cannot restore deleted files from a formatted storage drive. Therefore, it is suggested to use Windows Data Recovery Software. This tool can help recover deleted files from the external drive without any hassle.
It does not require any familiarity with the command lines. Moreover, it is quite easy to use and has an effective utility to recover files deleted by Windows Defender without any error.
Also Read: How to Recover Hidden Files from External Hard Drive?
Easy Guide to Recover Deleted Files Using Command Prompt
Perform the simple steps listed below instead of performing the hectic attrib command.
- Download the utility and Install it on Windows 11, 10, 8, 8.1, 7, etc.
- Select the hard disk partition from which files were deleted and hit Scan.
- Preview complete files after a successful recovery.
- Save at any location on your Windows computer.
Note: In these simple four steps, you can retrieve lost files without performing CMD commands.
The Final Words
Sometimes, users accidentally delete some imported data. After that, they want to recover them. Thus, this article explains how to recover deleted files using the command prompt. Along with the deleted file, users can also restore the formatted data and even restore data from the virus-infected devices in Windows 11, 10, 8, and 7 by using Command Prompt.
If the command prompt does not give an appropriate result, then users can go to the third-party tool. The commercial software is capable of recovering all types of deleted or lost files, including applications, documents, media files, archive files, etc.
Common User Questions
Q: How do I retrieve lost files using the command prompt?
With the help of the above-mentioned blog, you can restore deleted files from the command prompt. In this post, we have described an efficient solution to resolve this issue.
Q: How can I restore deleted files using the command prompt?
With the above Freeviewer software, you can recover deleted, corrupted and formatted data without any file size issues.