How to Retrieve Deleted Files from SD Card Using CMD

Summary: If you want to recover deleted files from an SD card with CMD, please refer to this post to learn how to retrieve deleted files from SD card using CMD. Besides, another easier way will be introduced to recover lost files.

How to retrieve deleted files from SD card using CMD on Windows 11

“Last night when I connected my SD card with important data to my computer, to my surprise: I didn’t see anything. I don’t know if I did something wrong. I was told I should try CMD , that can help me recover my deleted data. The problem is that I don’t know anything about CMD! So, can you tell me how to retrieve deleted files from SD card using CMD?”

How to recover files from SD card using CMD

Using “attrib” lines to recover lost files is a popular method these days. Using this command, you can recover lost and hidden files from USB flash drives, hard drives, SD cards or other external hard drives due to incorrect settings or virus attacks.

Step 1. Connect the SD card to your computer via a card reader.

Step 2. Enter “CMD” in the search bar and open as administrator.

Step 3. Once the command prompt window opens, enter the “attrib” command to make hidden files visible. The entire command should be “attrib -h -r -s /s /d C:*.*”. (replace C with the destination drive letter).

Retrieve Deleted Files from SD Card Using CMD

How to retrieve deleted files from SD card using CMD Command

Windows File Recovery is a free and professional CMD data recovery program released by Microsoft. If you want to recover SD card files using CMD, then it is definitely the best choice. It supports recovering lost files from HDD/SSD/USB/SD card in Windows 10 2004 and above with high recovery success rate.

Before using it, you need to remember its syntax and the meaning of the parameters:

winfr source-drive: destination-drive [/mode] [/switches].

source-drive: The location where the file is located.

Destination -drive: The location to restore the file to.

[/mode]: According to the file system, select the mode.

File SystemScenariosMode
NTFSDeleted recentlyRegular
NTFSDeleted for a whileExtensive
NTFSFormatted diskExtensive
NTFSCorrupted diskExtensive
FAT and exFATAnyExtensive

[/switches]: According to the mode, select the appropriate switches.

SwitchesMeaningSupported Mode
/nTo filter the scan range: scans for a specific file with its file name/path/type, etc.All
/y:Recovers system files.NTFSSegment​​​​​
/uRecovers undeleted files, for example, from the Recycle Bin.NTFSSegment

Step 1. Get Windows File Recovery from the Microsoft Store and run it.

Retrieve Deleted Files from SD Card Using CMD

Step 2. Right-click the SD card and select “Properties” to view the file system of the SD card.

Step 3. Decide the mode and switches according to your file system and loss situation. Then, type in the command.

How to retrieve deleted files from SD card easier

As you can see, although you know how to retrieve deleted files from SD card using CMD, it’s not an easy way. For the average user, learning how to type the command line can take a lot of time. There can also be serious consequences if you enter the wrong command line. So this approach doesn’t work for everyone.

If you insist on using Windows File Recovery to recover deleted files from SD card, I suggest you try WinfrGUI. This is a simple version of Windows File Recovery utility that fully invokes the functionality of Windows File Recovery to achieve the same goal. The only difference is that WinfrGUI is easier to operate because it is a GUI program. Every step is intuitively guided, and without requiring the user to type a command line, you can do it with a few clicks.

Step 1. Download the freeware and run it. Then, select the SD card partition to scan and a destination folder to save the recovered files.

Retrieve Deleted Files from SD Card Using CMD

Step 2. Choose Quick Scan & Deep Scan. Quick Scan only supports the NTFS file system. You could target file types or folders to scan via “Advanced Settings” if you need.

Retrieve Deleted Files from SD Card Using CMD

Step 3. Click “Start Recovery” to start the scanning process. After the scanning completes, the files found will be saved in the destination folder.

Retrieve Deleted Files from SD Card Using CMD

Also Read More: How to Improve Your Software Quality Assurance Processes

Anil Kondla
Anil Kondla

Anil is an enthusiastic, self-motivated, reliable person who is a Technology evangelist. He's always been fascinated at work especially at innovation that causes benefit to the students, working professionals or the companies. Being unique and thinking Innovative is what he loves the most, supporting his thoughts he will be ahead for any change valuing social responsibility with a reprising innovation. His interest in various fields and the urge to explore, led him to find places to put himself to work and design things than just learning. Follow him on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *