Format a Corrupted Pendrive/SD Card Using CMD
Open the CMD window and type the following command and press enter after each.
diskpart
list disk : a list of all the storage devices connected to your computer will be displayed.
select disk # : (example: select disk 2). Cautions: Make sure you enter the disk number correctly. Otherwise, you may format your internal hard drive.
clean
create partition primary
active
select partition 1
format fs=fat32