How to Recover Deleted Files from Memory Card Using CMD

I'm trying to find a free method to recover some deleted photos from a 64GB SanDisk SD card. I heard that using CMD might work, but where should I start?

Best Answered by

Dany· Answered on Jul 20, 2023

The attrib command is usually used to recover files hidden in SD cards/memory cards that viruses have attacked. If you have accidentally deleted files or photos from the SD card or got it formatted without a backup, there is no way to recover files from the SD card using CMD for Windows. Whenever Instead, seek help from exclusive data recovery software.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

To achieve a high success rate of deleted file recovery from a formatted SD card, third-party SD card recovery software is recommended for you to try. EaseUS Data Recovery Wizard can perfectly replace the role of the attrib command in retrieving hidden files.

Unlike the CMD command which requests computer skills, EaseUS file recovery software is designed for all levels of users with an intuitive interface and plenty of auxiliary functions.

If you lost the memory card files without an apparent reason, it's likely that they are hidden. Usually, the culprits can be a virus, malware, encryption software, or other system manners, such as Windows system update, reinstallation, and so on.

You're supposed to unhide all the missing files and folders by using the following command lines. They'll return all invisible items to the original location until you execute the entered commands.

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 + X" keys and choose Command Prompt (Admin) to open the Command Prompt this time.

Step 3. Type attrib -h -r -s G:\*.* /s /d. This attrib command will recover everything that you cannot see from the memory card.

Syntax explanation:

  • –h clears the Hidden file attribute.
  • –r clears the Read-only file attribute
  • –s clears the System file attribute.
  • /s applies attrib and any command-line options to matching files in the current directory and all of its subdirectories.
  • /d applies attrib and any command-line options to directories

Use EaseUS Data Recovery Wizard to recover deleted or lost files easily and quickly.

Tutorials on how to recover lost, deleted, or formatted data from HDD, SSD, USB, SD card, or other storage media on Windows and Mac.

People Also Ask

Recover Lost Files After Removing Redirected Folders

It is sad to lose essential files after removing redirected folders, and most users will keep a backup while using a Windows domain. You can recover files from your previous backup or find a recovery tool to help you.

Dany

Jul 20, 2023

How Does an Excel File Get Corrupted? Here Are Reasons and Fixes

If n excel file gets corrupted, don't be concerned. We'll demonstrate how to fix corrupted files that can't be opened in Excel and give you a bonus tip for using the EaseUS Data Recovery Wizard to recover deleted or Excel files.

Dany

Jul 20, 2023

Recover Quicken Files [QDF File Recovery]

EaseUS Data Recovery Wizard allows users to recover deleted Quicken files (.qdf) after deletion. Not only for the quicken files, but it also supports to recover all types of files from hard drives, sd cards, memory cards, and more.

Dany

Jul 20, 2023

How to Recover Deleted Files on Windows 10 in 2023

If you deleted some files on Windows 10, you should go check the Recycle Bin immediately. If you cannot find them in the Recycle Bin and the File History is not enabled, you can try the methods we mentioned in this short passage.

Dany

Jul 20, 2023

What Is the Free File Undelete Software on Windows 11/10/8/7

Data loss is simple and is caused by formatting, system crashes, and deletion. Fortunately, even if you don't have a backup, free hard drive recovery software can assist in restoring deleted files.

Dany

Jul 20, 2023

How to Recover MP3 Files from Formatted SSD | MP3 Recovery

After accidentally formatting the SSD hard drive, you should know recovering data from a formatted SSD is hard. You can try to recover MP3 files from formatted SSD with EaseUS Data Recovery Wizard.

Dany

Jul 20, 2023