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 Mar 10, 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.6

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

Can't Delete Files Without Prompt in Solaris 5.10 with RM Command

I have deleted a large number of files from my Directory using the rm -rf *.* command as a regular user, but it still asks for my consent. How to fix this problem and delete these files from my Solaris 5.10?


Mar 09, 2023

How to Decrypt and Recover Files Encrypted by Cryptolocker

Cryptolocker is an advanced malware that attacks files on your computers, and then you can't access them unless you pay the ransom. Here, we show you the best ways to decrypt and recover files deleted or encrypted by cryptolocker.


Mar 10, 2023

How to Recover Deleted Word File by CTRL + Z and CTRL + Y

Is it possible to recover an unintentionally unsaved Word document on a Windows? Fortunately, we'll review this topic and offer options for recovering your deleted Word document. So, if you wish to retrieve this accidentally unsaved Word document on a Windows, there are a few options.


Mar 10, 2023

How to Delete Batch Files of a Folder but Not Subfolders

It is possible to delete files in a folder and keep the subfolders, and you need to use command lines in Command Prompt. Learn the details by reading the following passage.


Mar 09, 2023

Does Windows Server Essentials Shared Folder Have Recycle Bin

It is clever to look for a data recovery method to protect your data on Windows Server. We will provide two methods to recover data and give you some tips to protect your data.


Mar 09, 2023

How to Recover Deleted Files on Windows File Server

You can recover deleted files on Windows Serve due to system updates, thoughtless deletion, formatting, or an unexpected virus assault using EaseUS data recovery software. Continue reading to recover Windows Server files right away.


Feb 22, 2023