(Recommended) How to Recover Lost Files from SD Card Using CMD?

How to recover lost files from SD card using CMD? This tutorial offers you several free solutions using tools for CMD SD card recovery.

Penny

By Penny / Updated on April 2, 2024

Share this: instagram reddit

Can I recover lost files from SD card using CMD?

A secure digital card (SD card) is a small flash memory device that provides high-capacity memory in a portable form factor. It grew out of an earlier project known as the MultiMediaCard (MMC). Therefore, many users have gotten into the habit of using SD card for data storage.

However, some users are wondering it is possible to recover lost files from SD card? Because these deleted files cannot be restored from the Recycle Bin. Fortunately, CMD and other data recovery tools like Windows File Recovery can recover lost files.

So you’re supposed to stop your SD card or reduce its usage on your electronic devices to improve the possibility for SD card data recovery.

How to retrieve deleted files from SD card using CMD?

Now that we’ve captured a critical prerequisite, then how to recover lost files from SD card using CMD? Maybe you can get your needed solutions below.

Way 1. Recover hidden files from SD card using CMD

Sometimes you cannot find your documents on your SD card, but they’re not deleted from your PC. These files are invisible to you by hiding themselves. If you’re not sure whether it loses or not, you can also start with this solution.

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

Step 2. Press the “Windows + X” keys for Windows 10, then select “Windows PowerShell (Admin)”.

Step 3. Open your Command Prompt window, then type “chkdsk ‘drive letter’:/fand press “Enter”.

chdsk-cmd

Step 4. Press Y and wait patiently. Then type your drive letter again and hit “Enter”.

Step 5. Enter “attrib -h -r -s /s /d *.*” and press “Enter”. Please wait patiently.

attrib-cmd

Way 2. Recover lost files from SD card with Windows File Recovery

How to retrieve deleted files from SD card using CMD? You can utilize Windows File Recovery directly. Because this free available application allows you to recover lost files that have been deleted from your internal and external drives, USB flash drives, or memory cards such as the SD card.

This command-line utility needs users to enter varied command lines for corresponding scenarios because there’s no accessible graphical user interface. Moreover, Windows File Recovery is not compatible with versions below Windows 10.

Two basic modes (Regular & Extensive) and another two advanced modes (Segment & Signature) allow it to recover different formats of files. For instance, MP3 files, MP4 videos, PDF documents, JPG images, Word, Excel, PPT, and ZIP files can also be restored by Windows File Recovery.

Notes:✎...
Adjust command lines based on this basic command format: winfr source-drive: destination drive: [/mode] [/switches]
As mentioned above, stop using your SD card if you cannot access your files on it.
 The source drive and destination drive are different. After the recovery process, you check your recovered files on the destination drive.
 Figure out your file system within these clicks. Click “This PC”, and right-click on the source drive which saves your lost files before losing, then click “Properties”. 

check-file-system

Step 1. Download Windows File Recovery from the Microsoft Store by clicking “Get”, then install it on your PC.

microsoft-store-get

Step 2. Enter “Windows File Recovery” in the search bar. And select the “Run as administrator” button to run it.

windows-file-recovery/windows-file-recovery-run-as-adminstrator

Step 3. You can re-examine your scenarios for data loss with this form, then select a comprehensive mode after figuring out your file system.

File system

Circumstances

Recommended mode

NTFS

Deleted recently

Default

NTFS

Deleted a while ago

Segment, followed by Signature

NTFS

After formatting a disk

Segment, followed by Signature

NTFS

A corrupted disk

Segment, followed by Signature

FAT and exFAT

Any

Extensive

Step 4. Resemble command lines with some General and Advanced syntax below.

General syntax:

Parameter / switch  

Description

Supported mode(s)

/regular

Regular mode, the standard recovery option for non-corrupted NTFS drives

Regular

/extensive

Extensive mode, a thorough recovery option suitable for all file systems

Extensive

/n

Scans for a specific file by using a file name, file path, file type, or wildcards. For example: 

  • File name: /n myfile.docx
  • File path: /n /users//Documents/

All

Advanced syntax:

Switch

Description

Supported modes

/ntfs

NTFS mode, a fast recovery option for healthy NTFS drives using the master file table

NTFS

/segment

Segment mode, recovery option for NTFS drives using file record segments

Segment

/signature

Signature mode, recovery option for all file system types using file headers

Signature

Step 5. Let’s take the lost Word files as an example. You can enter winfr C: E: /regular /n *.docx to salvage your lost Word files from the C drive.

Step 6. Press “y” to continue. If you want to stop, you can press the “Ctrl + C” keys.

WinfrGUI: Alternative & easier way

If you are unwilling to use the command prompt, so how to recover lost files from SD card? At the moment, you can ask WinfrGUI for help. Fully invoking Windows File Recovery (Microsoft command-line app), free WinfrGUI can restore deleted files with a graphical user interface.

Media files, office files, and ZIP files such as JPEG/PDF/DOCX/MP3/EXCEL/ZIP could be recovered by this 100% free and user-friendly tool. Please note that this free software is only comptabile with Windows 10/11.

 If there’s a sudden stop during the recovery process, WinfrGUI still tries to recover data from the scanned data.
Download Freeware Win 10 2004 and above
Secure Download

Step 1. Download and install WinfrGUI on your PC, and select a partition to scan data. Then specify another destination place (partition or folder) to save your recovered files.

select-a-partition-to-scan

Step 2. Select  Quick Scan or Deep Scan. If you need, you can click “Advanced Settings” to select your needed file types.

choose-scan-mode-to-recover

Step 3. Click “Start Recovery” to scan. Please wait patiently. Then you can click your destination place to check your recovered files.  

MyRecover: most recommended 

As mentioned above, WinfrGUI only works with Windows 10 and later. However, it might be a little inconvenient. Thus, why not try MyRecover? This reliable and user-friendly Windows data recovery software can fill in the gap better and provide a higher recovery rate for you. 

With this powerful utility, you can recover the deleted/lost files from SSD/HDD in Windows 11/10/8/7 & Windows Server. In this case, Word, PPT, Excel, Photos, Videos, Audios, emails, webpages, and Compressed files are retrievable. Please download and install MyRecover on the computer. Then refer to the following steps.

Download SoftwareWin 11/10/8/7/Server
Secure Download

Step 1. Run it on your PC. After loading the disk, hover the mouse over the drive saved deleted files before, and click Scan.

select-a-partition-to-scan

Step 2. This software will run Quick Scan or Deep Scan automatically. After scanning, you'll see the deleted files and other lost files on the window.

scan-lost-data

Step 3. Locate a destination place to save your recovered files and click "Recover x files" to retrieve them. 

recover-lost-data

Related suggestions

How to recover lost files from SD card using CMD? If you’re not sure whether your files are hidden or not, you can start with CMD. If it fails, you could skip Windows File Recovery and embrace Windows Data Recovery for Windows directly. Because it’s a reliable and handy tool for everyone to use.

Naturally, Windows File Recovery is also accessible for those users who are proficient in computers. 

What’s more, there’s no better way to improve data recovery security than by making regular backups. If you’ve suffered data loss, it is never too late to mend. Perhaps AOMEI Backupper is just what you’re looking for.

You can make a full/incremental/differential backup, sync files and folders, clone for disk upgrade, and data migration using it.

Penny
Penny · Editor
Penny works as an editor at AOMEI Technology, while she's a tester and editor for AOMEI Data Recovery Tools. She enjoys helping users with data recovery issues on Windows and iPhones using simple and practical solutions. Outside of work, she has a strong affection for pets, particularly giant pandas.