How to Recover Formatted Hard Drive/SD Card/USB Data Using CMD

Don't worry if you have formatted a hard drive, SD memory card, or USB pen drive in Windows 10/8/7. You can recover formatted data from hard disk or SD card using CMD. If this fails, you can still use format recovery software to recover the formatted data in a few simple clicks.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

Page Table of Contents

Updated By


Approved By

Evan Galasso

Updated on

09 May 2024

Min Reading

9 Min

How can I recover a formatted SD card using command prompt?

"Hi there, I got my SD memory card formatted by accident, and now I need a free way to get my formatted memory card data back. Do you know how to use CMD to recover files from formatted  SD card? Thanks!" 

It's no longer a new problem for users to lose files and data while formatting a hard drive, SD memory card, USB, or other storage devices. When coming across this problem, you have two free methods to recover formatted data from hard drive/SD memory card/USB.

Now, follow the depth details given below to recover deleted files from formatted storage devices effectively. 

How to Recover a Formatted Hard Drive/SD Card/USB Using CMD

Mostly, when you delete, hide or format a storage device like USB, SD card, or hard drive with data, CMD (Command Prompt) command line will give you a chance to find lost data.

You must be very careful while using the CMD command line to recover data from formatted hard disk, SD card, or USB because misoperation can cause more severe problems. If CMD fails to find your lost files, or if you don't know how to use the CMD, don't fret. You can skip this method and directly use the format EaseUS Data Recovery Wizard to help you do it without effort. 

1. Connect your Hard disk/SD card/USB with the system. Right-click on the Windows icon and select "Search".

Open CMD to restore formatted data.

2. Type: command prompt and right-click on Command Prompt, select "Run as administrator". Click "Yes" to run Command Prompt as administrator.

Run Command Prompt as administrator for file recovery.

3. Type: chkdsk F: /f  in Command Prompt and hit Enter. (Replace F: with the drive letter of the device where you lost files or data.)

Enter command line to restore formatted file.

4. Type: Y and hit Enter to continue.

Confirm and select device to restore formatted data.

5. Type: F and hit Enter again.
Type: F:\>attrib -h -r -s /s /d *.* and hit Enter. (Replace F with the drive letter of the device where you lost files or data.)

Enter recovery command line to restore lost data.

After this, your lost files will all be found and saved in a newly created folder on SD memory card, USB drive, or hard drive. You can change the file extension back to a normal format and then make those found files reusable again. If this method is unsuccessful, continue using CMD alternative recommended below to help you out and undo the format on your storage device on Windows 10/8/7.

How to Recover a Formatted Hard Drive/SD Card/USB with Data Recovery Tool

EaseUS Data Recovery Wizard is a perfect CMD alternative format recovery software that is developed to recover & restore lost data from the formatted hard drive in a simple and fast way. Except for the formatted recovery, the powerful data recovery software also can recover deleted files, lost partition, corrupted hard disk, raw partition, and more. 

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

Now, activate this tool to start your data recovery as soon as possible. The sooner you act, the more likely your data will be recovered. And of course, your privacy will be safe with our 100% clean and risk-free software. You may also contact our tech support team for online help anytime after the activation. 

Note: To guarantee a high data recovery chance, install EaseUS data recovery software on another disk instead of the formatted disk. 

Step 1. Launch EaseUS Data Recovery Wizard. Choose the hard drive partition which you've accidentally formatted and click "Search for Lost Data".

select a partition and click scan

Step 2. This formatted hard drive recovery software will start scanning for all the lost data and files. After scanning, you can click "Filter" to filter a specific file type to quickly find files you need. Or search the file's name in the search box to select data that you want to recover.

select scanned files

Step 3. Preview the scanned files. Then, select the ones that you wish to recover and click "Recover". Choose a new location or Cloud drive to store the files and click "OK".

recover files from formatted HDD

Consult with EaseUS Data Recovery Experts for one-on-one manual recovery service. We could offer the following services after FREE diagnosis:

  • Repair corrupted RAID structure, unbootable Windows OS, and corrupted virtual disk file (.vmdk, .vhd, .vhdx, etc.)
  • Recover/repair lost partition and re-partitioned drive
  • Unformat hard drive and repair the RAQ drive (BitLocker encrypted drive)
  • Fix disks that become GPT-protected partitions

Bonus Tip: Format Hard Drive/SD Memory card/USB to Use Again

After restoring data from formatted or unformatted SD memory card, USB, or hard drive, formatting the storage device to workable (NTFS or FAT32, etc.) again is also necessary:

  1. 1. Connect the formatted or unformatted storage devices to your PC.
  2. 2. Open This PC or My computer, right-click your device, and select "Format".
  3. 3. Reset the system file to NTFS or FAT32 to make them usable again.

You can also apply the Disk Management tool on Windows PC to format and reset the formatted storage devices. After this, you can reuse the memory card or USB hard drive to save and store data again.

  • Updated by

    Cedric Grantham is a senior editor and data recovery specialist of EaseUS. He mainly writes articles and how-to tips about data recovery on PC and Mac. He has handled 10,000+ data recovery cases and is good at data recovery of NTFS, FAT (FAT32 and ExFAT) file systems, and RAID structure reorganization. …
  • Approved by

    Evan Galasso is a digital forensics and data recovery engineer with over 10 years of experience in the field. He presents opinions on the current state of storage media, reverse engineering of storage systems and firmware, and electro-mechanical systems of SSDs and HDDs.…
Why Trust EaseUSEditor Reviews


Years of experience


Countries and regions

72 Million+


4.7 +

Trustpilot Score

Data Recovery Service