Repair corrupted memory card or Pendrive/Format drive using CMD

A corrupted memory card or pendrive can be frustrating, especially when you have important files and data stored on it. However, there’s no need to panic, as there are ways to repair the corrupted drive and retrieve your data. In this blog post, we will show you how to repair a corrupted memory card or pendrive using the Command Prompt (CMD).

Why Memory Card/Pendrive gets corrupted:

Corrupted memory cards and pendrives can be caused by a variety of reasons such as a faulty USB port, a bad sector on the drive, or a virus infection. Regardless of the cause, the end result is the same – you can’t access your data.

Formatting the drive using CMD:

One of the ways to repair a corrupted memory card or pendrive is to format it using the Command Prompt (CMD). This will erase all the data on the drive and repair any errors on the file system. Here’s how to format a drive using CMD:

  1. Connect the memory card or pendrive to your computer.
  2. Press the “Win + R” keys and type “cmd” in the Run box.
  3. Press “Enter” to open the Command Prompt.
  4. Type “diskpart” and press “Enter.”

5. Type “list disk” and press “Enter” to view all the connected disks.

list disk

6. Type “select disk X” (X represents the number of the disk you want to format) and press “Enter.”

select disk (Enter No.) 

7. Type “clean” and press “Enter” to delete all the partitions on the disk.


8. Type “create partition primary” and press “Enter” to create a new partition.

create partition primary

9. Type “active” and press “Enter”


10. Type “select partition 1” and press “Enter” to select the new partition.

select partition 1

11. Type “format fs=ntfs” and press “Enter” to format the partition as NTFS.

format fs=fat32


Formatting a corrupted memory card or pendrive using CMD is an effective way to repair the drive and retrieve your data. However, it’s important to note that this method will erase all the data on the drive, so make sure to backup important files before formatting. Remember to always safely eject the device before unplugging it.

“If you don’t get this method, Comment below as soon we will help you.

Thank you

Leave a Reply

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

Previous Post

Fix Wifi connection not working/error in Windows 8/10/11

Next Post

Why is “My Phone Battery Going Down While Charging?” Fix It

Related Posts