Occasionally, there is a possibility that USB drives, SD cards or hard disks cannot be formatted because they are "corrupt". In that case, the following message will appear: "Windows could not complete the format". Fortunately, there is a solution to this drawback. It is a tool called DiskPart and can be used in Windows XP, Vista, 7 and 8.
How To Use DiskPart to Clean, Format, and Fix USB Flash Drive and SD Card
Press the Windows + R keys. Once the window opens, type diskpart and press Enter:
In Windows XP type diskpart.exe
Once the black window appears, type list disk and press Enter:
In this part you should be very cautious. First, find your USB drive or SD card by size. Once you know where it is, type select disk and enter the number of the USB drive, SD card or hard disk (Warning: Bad handling in this step can result in the loss of data that you do not want to delete.
It is important to follow the instructions to the letter).
If you do not know with certainty which one is your USB drive or SD card, type detail disk to verify that the chosen unit is the correct one. The detail disk option also allows you to check if the drive cannot be formatted because it is write protected:
Once you are sure that you have selected the correct drive, type clean. If the drive has more than one partition, type clean all:
When you have finished with the above procedure type create partition primary:
Then type select partition 1:
Then enter the command active:
Finally, type format fs=fat32 quick. For hard disk drives, type format fs=ntfs quick: