Fix a Corrupted Pen Drive or SD card using Command Prompt

Has your Pen Drive or SD card stopped working suddenly? Are you tired of formatting it again and again? And still, your storage devices continue to malfunction.

Most of you might have faced this problem with your Pen Drives and SD cards. If yes, then we are here to help you solve this problem and fix your corrupted USB drive.

We can repair a corrupted pen drive or SD card using Command Prompt in windows. This How to guide will help you do that in a simpler way. In this technique all you need is to enter some commands in command prompt and windows will forcefully format your corrupted pen drive or SD card.

Fix a Corrupted Pen Drive or SD card using Command Prompt

Follow these simple steps and you can do that in just a few minutes.

Connect the corrupted pen drive or SD card to your computer.

Now open Command window. You can actually do this in several ways. Press Windows Key+R and type cmd in the dialogue box and click on OK. This will let you open a command window. Also, you can click on start button and type cmd in the search box and select the command prompt program.

Once done with opening the command prompt window, it’s time to enter some commands into it.

Type diskpart and press Enter.

Next type list disk and press Enter. This will display a list of all the storage devices connected to your computer.

Now type select disk <the number of your disk> and press Enter. Here the number of your disk is the number assigned to your removable storage.

Note: Make sure you enter the number correctly. Otherwise, you may format your internal hard drive.

After selecting the disk accurately, type clean and press Enter. Next type creates partition primary and hit Enter.

Now type active, and press Enter.

Type select partition 1, and hit Enter.

Finally, type format fs=fat32 and hit Enter. You can write NTFS instead of fat32 to format drives larger than 4 GB.The format process will complete in a few minutes. Do not close the window till the process is done.

Here is the entire process.

diskpartOnce done your USB drive is back to normal again.

Read also: How to stop pen drives from getting viruses ?

19 thoughts on “Fix a Corrupted Pen Drive or SD card using Command Prompt”

  1. I’m getting stuck on step 5. I already cleaned the disk. After that I typed “CREATE”, it’s showing 3 options partition volume and vdisk. I typed partition but it fails….

  2. I have a problem in step 5 and I can go further its keep showing me an error which is (disk part has encountered an error: Data error: .) and it will show … See the System Even Log for more information. thank you am waiting for your reply.

  3. Hi,my sony pendrive is corrupted i use the above mentioned step but it is not clear,after step 5 it’s says “the syst cannot find the file specified see the syst event for more information” can any one clear it.

  4. I know this chain of command but it does not necessarily solve the problem. I actually used this in several occasions for other different cases but to fix the problem of a currupt pen drive i use a software design in doing that.

  5. Sir,after all steps now I insert again pen drive but it is not open now in the step list disk only hard disk shown. Kindly suggest me

  6. Ho can you repair a completely unreadable flash drive whicj when iserted in PC shows nothing and a flash drive which doesn’t show it’s drive letter. I have already seen this process when i was in school and i couldn’t do it due to some errors. Is there any new method exist? Is it possible to repair a corrupted flash drive in 2017?

  7. open CMD
    Select your USB drive
    C:\> H:
    press Enter
    and type the following command
    H:\>attrib -s -r -h *.* \s \l \d (here H is your USB drive)
    and press Enter
    now your USB drive shows files

    Hope it will be helpful for you

    • I have tried the process but failed to fix error. I am attaching a screen shot of my computer. Please answer me how to fix error of my pen drive.

  8. I have tried to fix my pen drive by using the above mentioned methods and successfully repaired it. But unfortunately, had lost some of my files from the drive and to get those files back i downloaded Stellar Windows data recovery home software and It worked for me!


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.