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
-
Go to CMD. Press the Windows key + R then type cmd or just search the CMD in the start menu.
-
Type 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 -
After 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.
-
Type 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.
-
Type [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.
-
Copy 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.Advertisement
Community Q&A
Search
-
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."
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Things You'll Need
- laptop or desktop
- external drive like memory stick, USB, etc.
References
About this article
Thanks to all authors for creating a page that has been read 60,587 times.
Advertisement