How to Retrieve Deleted Files from SD Card Using CMD

Avatar for Dervish

Want to retrieve deleted files from SD card using CMD

“Last night, when I connected my camera’s SD card to my computer, something surprising happened to me: I didn’t find any files. I may have mistakenly deleted files that didn’t have any backups. I was told that I should try the command OK, this can help me recover deleted files easily. 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 SD card files using CMD

The most popular command prompt is the attrib line. 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 it as Administrator.

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

How to retrieve SD card files with Windows File Recovery

Windows File Recovery is a professional and free CMD data recovery program released by Microsoft. If you want to recover SD card files using CMD, then it can definitely help. Because it supports to recover lost files from HDD/SSD/USB/SD card in Windows 10 2004 and above systems.

winfr sourcedrive: destinationdrive: [/mode] [/switches], this is the format and common syntax for Windows file recovery commands.

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

Destination-drive: The location of the restored files.

[/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.NTFS/Segment​​​​​
/uRecovers undeleted files, for example, from the Recycle Bin.NTFS/Segment

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

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-like like: winfr C:E:/regular /n.

How to recover SD card files in an easy way

As you can see from Windows File Recovery, this is not an easy method. For the average user, it may take a lot of time to learn how to type the command line. If the wrong instructions are entered, your time may be wasted.

It is recommended that you use WinfrGUI, which is a free data recovery software. It fully invokes Windows file recovery features to help users recover deleted or lost files in a graphical user interface.

Step 1. Download the freeware first.

Step 2. Select the SD card partition to scan and a destination folder to save the recovered files.

Step 3. 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.

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

This is the whole process of how to retrieve deleted files from SD card using CMD. If you haven’t tried these before, it’s time to take some measures.