By Stephanie / Last update May 11, 2022

Is it possible to retrieve deleted files from SD cards using CMD?

SD card/memory card is used to save personal files, including photos, videos, and music for portable storage devices. In addition, it can help users to save and transfer files between computers and laptops.

However, sometimes the memory card stops working suddenly. Memory card can't be accessed or needs to be formatted, memory card not found, etc. The most common reason is that files on the memory card have been accidentally erased or are missing.

Have you ever lost data from an SD card, such as photos, videos, or documents? Are you wondering is it possible to recover deleted files from SD card using CMD? How to view the hidden files on an SD card? Reading the following to learn how to retrieve deleted/lost files from SD cards using CMD.

Recover hidden files from SD card using CMD

When you found some files in the SD card lost, they may be hidden. You could show hidden files on an SD card or flash drive using CMD. It is critical to know the reasons for hidden files in order to avoid more problems. The following are some possible causes:

 SD card or flash drive is infected with viruses or malware.
 Mistakenly operation. You may delete or format the SD card accidentally.
  Unplug the SD card suddenly when some process is not completed.
 You may have purchased a low-quality flash drive or SD card.

Steps to recover hidden files from SD card using CMD

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

Step 2. Press the Windows + R keys and input “CMD” in the Run window.

Step 3. After the command prompt window opens, input the “attrib” command to make hidden files visible. The entire command should be “attrib -h -r -s /s /d E:\*.*” (Replace E with the drive letter of SD card”.

attrib-command

Retrieve deleted files from SD card using Windows File Recovery

If you permanently deleted files from your SD card, you could try the Microsoft official command-line app-Windows File Recovery. This is a free tool to help users retrieve lost or deleted files from local storage drives. It supports Windows 10 2004 and above.

You could use the tool to scan your disk to recover deleted files. There are several scanning modes available (regular, extensive, segment, signature). Windows File Recovery is compatible with the NTFS, ReFS, FAT, and exFAT file systems and can recover lost files from HDD/SSD/USB drive/memory card.

Here is the format of the Windows File Recovery command and common syntax to use:

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

/regular: regular mode only supports non-corrupted NTFS drives.

/extensive: extensive mode supports for all file systems.

/n: specify scanning by a file name, file path, file type, or wildcards.

/y: recover special extensions separated by commas.

Step 1. Download and install Windows File Recovery from Microsoft Store.

get-windows-file-recovery

Step 2. Connect the SD card to your computer. After the computer recognizes the memory card, right-click the external drive, and select “Properties” to check the file system.

check-file-system

Step 3. Decide command mode and switches according to your file system and loss scenarios.

File system

Circumstances

Recommended mode

NTFS

Deleted recently

Regular

NTFS

Deleted a while ago

Extensive

NTFS

After formatting a disk

Extensive

NTFS

A corrupted disk

Extensive

FAT and exFAT

Any

Extensive

 

For example:

If you want to recover your Workshop folder from your F: drive to the recovery folder on an E: drive, the right command should be the following one. Please do not forget the backslash (\) at the end of the folder. 

Winfr F: E: /regular /n \Workshop\

★★★Windows File Recovery GUI

From the above tutorial, it’s not hard to see Windows File Recovery is difficult to use for common users. Because it’s a command-line application. If you input the wrong commands, you will get kinds of errors.

Here is a tiny utility to recommend-WinfrGUI, which fully invokes the function of Windows File Recovery and helps users recover deleted or lost files in a graphical user interface. WinfrGUI is 100% free for everyone to use.

Step 1. Download and install this tiny tool on your computer.

Download Freeware Win 10 2004 and above
Secure Download

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

select-a-partition-to-scan

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.

choose-scan-mode-to-recover

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

click-start-recovery

Recover deleted files from SD card via SD card data recovery software

The easiest and highest recovery success rate to recover deleted files from SD cards is data recovery software. AOMEI Data Recovery for Windows is highly recommended to restore data from an SD card, even if the SD card is formatted. The powerful data recovery software can also recover deleted files from computers, external hard drives, and other Windows storage devices.

AOMEI Data Recovery for Windows

▶ Support for permanently deleted files recovery, formatted file recovery, and other data recovery methods.
▶ Recover deleted files from SD cards, USB flash drives, HDDs, SSDs, external hard drives, and other storage media.
▶ Recover lost Word documents, Excel spreadsheets, photos, videos, audios, emails, and hundreds of other file types.
▶ Compatible with Windows 7/8/10/11 and Windows Server.

Download SoftwareWin 11/10/8/7/Server
10,000 people have downloaded it

Step 1. Launch AOMEI Data Recovery for Windows on your computer. Select your SD card and click "Start Scan". 

scan-external-hard-disk

Step 2. The program runs the scanning process quickly and finds deleted files and other missing files in the SD card.

external-hard-drive-scanning

Step 3. During scanning, you could recover any file you want. Select the file or the folder that you want to recover and click "Recover files".

external-hard-drive-recover-files

Bonus tip-avoid data loss

The two methods above have solved the question “how to retrieve deleted files from SD card using CMD”. But it’s difficult for ordinary users to input commands correctly. You could try the free data recovery software-AOMEI Data Recovery for Windows to recover deleted or lost files from local storage devices with simple clicks.

To avoid data loss in the future, the best way is to make a regular backup of important data. Don't put all your eggs in one basket. AOMEI Backupper is recommended to everyone! It has multi-functions to back up, restore, and clone your system and data in schedule easily. It’s a necessary tool for keeping vital data safe.