How to format disks using DISKPART

The steps below show how to use the DISKPART command line tool to reformat the USB drive. You will need local administrator access on the computer to follow these steps. The process will involve wiping the USB drive – back up before progressing.

  1. On your keyboard, press the Windows button + R
  2. type DISKPART and click ‘OK’
  3. Click ‘Yes’ if prompted by the User Access Control
  4. DISKPART will open in a command prompt window
  5. Type list disk and hit enter
  6. USBDriveDiskPart2
  7. You will need to identify your drive by size, in this case I can see it is disk 2
  8. Type select disk 2 (where 2 is the number from the previous step)
  9. The command prompt will respond by saying “Disk 2 is now the selected disk”
  10. Now enter the following commands (if your disk is a USB drive, I recommend sticking with fat32 for the best compatibility across different operating systems. If your disk is a system drive use NTFS instead, e.g. format fs=ntfs quick)
  11. attributes disk clear readonly
    convert mbr
    create partition primary
    select part 1
    format fs=fat32  quick
    assign letter x
    list volume
  12. USBDriveDiskPart3
  13. Type exit and hit enter to close the window.
  14. You drive will now be reformatting using the full capacity as FAT32


Help – it didn’t work !

Denied permission

After completing these steps, if you get an access denied message when opening the drive – try removing and re-inserting the drive.

I still can’t access the drive!

For some reason this doesn’t work first time.

If you still can’t access to drive:

  1. Unplug and plugin the USB drive again
  2. Repeat the instructions above

Related Articles

4 comments on “How to format disks using DISKPART

  1. DiskPart does not remove readonly from attributes on Samsung 16GB microSD class C, also Regedit key entry edit does not correct this issue. The microSD card is not physically write protected, however even after claiming to remove the “readonly” attribute, both processes/fixes do not actually remove the software “write protected” issue.

    1. Sounds more like a hardware fault to me, or possibly (depending on it’s age and how much it’s been used) that
      the memory card has met its theoretical read/write limits and has been programmed to go
      into ‘read-only’ at the hardware level.

Leave a Reply

Your email address will not be published. Required fields are marked *