On Windows 10 ,7 , when an external drive (USB flash drive, SD card, or secondary drive) stops working due to data corruption or another logical problem, DiskPart can help properly erase everything and start clean with a new partition.
For some reasons ,Some USB keys have been found to have various partition table set-ups that the USB software will not work with. You can use Windows Diskpart to re-format a USB key and re-partition it.
- Open a Command Window (cmd) , Run as administrator option.
- Enter diskpart
- Enter list disk (it is important you KNOW which disk is the USB key you are formatting)
- Enter select disk x where x is your USB key drive number you want to repair as it appears in the “Disk” column. If you do not perform this step correctly, you could erase the wrong drive. Proceed with caution.
- Enter clean
- Enter create part primary
- Enter select part 1
- Enter active
- Enter format fs=fat32 label=”bccline” (Label is optional – ensures USB key is labelled as bccline in Explorer etc) you can add quick
format fs=FILE-SYSTEM label=DRIVE-LABEL quick
The quick option is optional to perform a format more quickly. However, if you are not sure about the drive’s condition, it is best to skip the option. Just remember that depending on the hard drive’s size, the format could take a long time.
This example formats the drive using the NTFS file system and names the partition “bccline”:
format fs=ntfs label=bccline quick
- Type the following command to terminate DiskPart and press Enter: