wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 59,307 times.
Learn more...
If the pictures on your external hard drive, flash drive, or memory card are missing, you may be able to recover them using the Windows command prompt. While data recovery tools are usually best for the job, using the "chkdsk" and "attrib" commands can often restore corrupt files, as well as files you thought were permanently deleted by malware like the USBC virus. This wikiHow article will teach you commands you can use to undelete photos from any external drive or memory card.
Steps
-
1Go to CMD. Press the Windows key + R then type cmd or just search the CMD in the start menu.
-
2Type chkdsk "drive letter" /f then hit ↵ Enter. This is the first line of code that we are going to use in the recovery process. Make sure that everything is separated with a single space.
- ex. C:\Users\TheVirtualWriter>chkdsk E: /f
Advertisement -
3After hitting the enter button, type Y to those preceding commands until command line starts again. Do not panic if there are a lot of commands appearing on the cmd window. These commands are one of the process of recovering the file. Just type (Y) to those command questions to proceed.
-
4Type the drive letter again then hit ↵ Enter. [ex. C:\Users\TheVirtualWriter>E:]. The command line will go back to start again after scanning the drive and converting the files inside.
-
5Type [E:\>attrib -h -r -s /s /d *.*]. This is the last line of command that we are going to use. This will recover everything that is inside the external drive.
- After typing the code, a new folder will be created in your memory stick and this folder holds all the photos that are recovered on your memory stick.
-
6Copy everything and then change the file name extension from .CHK to .JPG. All the files will be in .CHK format. They are the recovered files. Just change the file name extension in order the files will appear and recovered. This step need patience because you are going to change them manually one by one.
Community Q&A
-
QuestionIm getting a message which states "access denied". What can I do?Community AnswerYou may need to run CMD as administrator, or it could deny access, as many features are not enabled to other users.
-
QuestionWhat do you mean by, "This will recover everything that is inside the external drive" in step 5? Does it also include videos?Community AnswerThey mean that no data inside the external drive will be lost, including videos.
-
QuestionHow do I make sure I have privileges to run command prompt?Community AnswerOn the command prompt window, be sure that the window's title is "Administrator: Command Prompt."
Things You'll Need
- laptop or desktop
- external drive like memory stick, USB, etc.