30/05/2017
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.
Step-1:
Connect the corrupted pen drive or SD card to
your computer.
Step-2:
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.
Step-3:
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.
Step-4:
Now type select 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.
Step-5:
After selecting the disk accurately, type clean
and press Enter. Next type creates partition
primary and hit Enter.
Step-6:
Now type active, and press Enter.
Type select partition 1, and hit Enter.
Step-7:
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.
source:ethiopian programmers community