Recover Deleted Files from Memory Card Using CMD

Jean updated on Aug 06, 2019 to Storage Media Recovery | How-to Articles

Summary

The command to recover deleted files from memory card, USB stick, pen drive and external HDD includes the attrib command and the dos command. This tutorial is written for both average and advanced users to recover deleted files from memory card using cmd.

What's the Command to Recover Deleted Files from Memory Card, USB stick, Pen Drive or HDD?

"Hi, are you willing to share a detailed guide about how to recover deleted files from memory card using cmd? I heard that deleted files not in the recycle bin can be retrieved with command prompt, but I don't have a clue where to start. Cheers."

The command to recover deleted files from data storage devices like a memory card and a USB flash drive includes the dos command and attrib command. Whenever you accidentally deleted files and photos from SD card or formatted a USB stick, or emptied the Windows recycle bin, it's good to know how to use the command prompt to bring them back.

How to Recover Deleted Files from Memory Card Using CMD

It's said that there are two effective methods to restore permanently deleted files in Windows 10, 8 and 7, including the command prompt and online data recovery software. Generally, the former method is only recommended for advanced users who have some computer skills, while the latter is for both average and advanced users who demand a high rate of successful deleted files recovery from memory card, USB flash drive or other data storage devices.

Step 1. Use a card reader to connect the memory card where you deleted files to a Windows computer. Assuming that the drive letter of the card appears as drive G:.

Step 2. Press the Windows key + R simultaneously. In the search box, type cmd and press Enter. Now, cmd.exe is launched.

Step 3. Type the first command line: chkdsk G: /f and then press Enter. (Replace G with the exact drive letter of your memory card.)

Step 4. Type Y to allow the command to proceed.

Step 5. Type G: (the drive letter) again to go back to start again.

Step 6. Type [G:\>attrib -h -r -s /s /d *.*]. This attrib command will recover everything that you deleted off from the memory card.

How to Recover Deleted Files from Memory Card Using Software

Some people will encounter an error message that says "access denied as you do not have sufficient privileges". If you don't know how to continue, you'd better give up undeleting files using cmd. It's dangerous because a single mistake could result in a permanent loss, and no more solutions would be found.

Alternatively, download EaseUS free data recovery software and try to perform memory card data recovery in an automatic way. All you have to do is wait until the software finishes scanning the card and finding all the deleted files on it.

Usually, deleted or formatted data is not permanently removed. Stop using the memory card once you lost data on it. With powerful memory card recovery software, you can hopefully get lost data back.

Step 1. Run memory card recovery software

  • Connect the memory card on which you lost your files to your computer and launch EaseUS card recovery software - Data Recovery Wizard on your PC.
  • Select your memory card under External Devices and click "Scan" to start finding your lost files.
Select memory card to scan and find lost files.

Step 2. Scan to find all lost files from memory card

EaseUS Data Recovery Wizard will fully scan your memory card and find all your lost data on it.

Scan memory card to find lost files.

Step 3. Scan to find all lost files from your memory card.

After the scanning process, you can check and preview found files in this program.

  • Underneath Deleted Files, you can find your deleted memory card files there.
  • And if you formatted the memory card, you can check those files under Lost Partition Files.
  • And Filter will help you quickly find your lost files from Graphics, Documents, Videos, Audio, and Email, etc.

You can directly double-click the files to preview and see if found files are all right. After this, you can choose those files and click "Recover" to restore them to a secure location on your PC or other external storage devices.

Restore lost memory card data.
 
 

100% of people found this article helpful.

 

Frequently Asked Questions

1. Why cannot I recover 2GB data for free?

It is recommended to check the version installed is Free or Trial because they are different versions.

Trial has data preview function but cannot save any files, while the Free version enables to recover 2 GB files. The default free space is 500 MB and you may share the product on social media to get another 1.5 GB.

2. Why cannot the recovered files be opened?

A file is saved as 2 parts on the storage device: directory info (which is comprised by file name, time stamp and size info, etc.) and data content.

If the files with original file names and folder structures cannot be opened, one possible reason is the corrupted directory info. There is still a chance to recover the data content with the RAW Recovery method in our software.

3. Why isn't it suggested to recover the files back to the original drive?

The storage structure of the lost files would be altered or damaged by any changes on the drive. If you save the recovered files back to the same drive, the original data structures and data content would be corrupted or overwritten, which causes permanent data loss. So you should prepare another disk to save the files.

4. How can I check whether my data is recoverable or not before purchase?

The Free version helps you save 2GB files to better verify the recovery quality of our product before purchase.

5. How long does it take to scan the drive?

It strongly depends on the capacity of your hard drive and the performance of your computer. As reference,most drive recoveries can be completed in around 10 to 12 hours for a 1-TB healthy hard drive in general conditions.

About Data Recovery Wizard

It's super easy to recover 250+ types of files after deletion, disk formatting and virus infection. Click the links and compare the difference of each version.