Diskpart to Format USB Flash Drive Memory Card and Hard Disk Partition FAT32/NTFS/GPT

Once upon a time, a friend came to us with his flash drive raw in file system and asked whether there was a guide for using diskpart to format the drive. Here are some contents focusing on using diskpart for doing the formatting.

This article shares following information related to Diskpart command

How to Open Diskpart under Different Windows?

Diskpart command utility is able to work in Windows 2000, XP, Vista, 7, 8, 10. The methods to open Diskpart command vary, depending on different Windows platform.

1. Access Diskpart in Windows XP

Click "Start" button > "Run" > type "diskpart.exe" and press "Enter" button

run diskpart on windows xptype diskpart

Or you can click "Start" button on > "Run" > type "cmd" and press "OK" button > type "diskpart" and press "Enter"

windows xp diskpart

2. Open Diskpart in Windows Vista/7

Click "Start" button > type "cmd" in the search bar > right click "cmd.exe" and choose "Run as administrator" > type "Diskpart" and press "Enter"

run diskpart windows 7

3. Run Diskpart on Windows 8/10

Type 'Diskpart' in the run at the left bottom corner of your computer, and then right click it to run in administrator mode.

Or you may press Windows + X keys at the same time > select Command Prompt (Admin) > type type "diskpart" and press "Enter"

run diskpart windows 8

Diskpart to Format Hard Disk Partition

It does not matter which Windows operating system is running on your computer, you can follow the steps below to format an internal hard disk partition on Windows PC after running diskpart command:

Step1. Type list disk and press Enter

list disk

Now, you will see a list of disk which shows all disks on your computer.

all disks

Step2. Select a disk that you want to format by type select disk 0 (e.g. you want to format disk 0) and press Enter.

select disk

Now, it will show a message saying disk 0 is now the selected disk.

disk is selected

Step3. Type list volume and press Enter button to show all volumes

list volume

Step4. Type format fs=ntfs label=volume label quick and press Enter to execute the format. (eg, 'format fs=ntfs lable=Local Disk quick')

Diskpart to format sd/usb/hdd fat32/exfat/ntfs? If you want to format the volume to FAT32 file system, you can type format fs=fat32 label=volume label quick (This shows diskpart to format volume fat32/ntfs/exfat). Here are options that you may use for different file systems.

  1. format D:/ fs=ntfs quick
  2. format D:/ fs=fat32 quick
  3. format D:/ fs=exfat quick

diskpart to format partition

Pay attention: Volume label refers to the label of the drive that you want to format, such as the image showing below. The volume label of the partition is "My Documents".

No label for volume? => replace the label volume with its drive letter such as D:, then the diskpart command line shall be changed to "format D: / fs=ntfs quick".

Or you may type the following in order if there is no volume label,

  • 'select volume *', such as 'select volume 4', and click enter button.
  • and then type 'format fs=ntfs quick'

volume label

When the format is completed, you will see message showing "Diskpart successfully formatted the volume"

diskpart format successfully

Diskpart to Format USB Flash Drive, Memory Card, External HDD

If you need to use Diskpart to format a USB flash drive, memory card, external hard drive or pen drive on your computer, you can follow the similar guide when run Diskpart to format a hard disk partition but it has a little difference.

Step1. Type list disk and press Enter to show all disks on your computer.

show all disks

Step2. Type select disk 2 (disk 2 is the digital device you want to format) and press Enter

select disk 2

Step3. Type clean

clean
Step4. Type create partition primary

create partition primary
Step5. Type Active

active

Step6. Type format fs=ntfs label= "label of digital device" quick without quotes and press Enter to format it to NTFS file system or type format fs=fat32 label= "label of digital device" quick without quotes and press Enter to format the digital device to FAT32 file system.

diskpart to format partition

Note:

The command format fs=ntfs label="volume label" quick: it is to format the drive to NTFS format; for example, you may use 'format fs=ntfs label=UK quick' to quick format flash drive H to be ntfs. It is the same if you use 'format H: / fs=ntfs quick'.

If you need to format the drive as FAT32, the command is: format fs=FAT32 label="volume label" quick;

If you need to format the drive as exFAT, the command is: format fs=exFAT label="volume label" quick;

Diskpart to Format GPT (in Windows or While Installing OS in Bios)

How to format disk gpt using cmd diskpart? Here are two parts, one to format disk from mbr to gpt using diskpart cmd in Windows 10/8/7; the other one is to format disk gpt from mbr in Bios while installing Windows. Be free to follow the following steps.

diskpart format disk gpt using cmdDiskpart format disk gpt using cmd

Video 1 - how to format disk from mbr to gpt using cmd diskpart

Video 2 - how to format disk mbr to gpt in bios during Windows installation

Diskpart Is Unable to Format - Write Protected

Diskpart may report it is unable to complete the format due to device write protected with readonly mode. Sometimes it could be caused by the end of life span of your device. You may try the following ways to see whether it may work, or your device is dying.

Pay attention: If none of the above method work for your device, it still reported write protected, then mostly your device is coming to the end of lifespan.

Diskpart Cannot Format Digital Device

PC failed to complete the format when you run Diskpart to perform formatting? This problem might result from any reasons. Below are some common messages you may receive when Diskpart failed to format a digital device:

1. Diskpart has encountered an error: Incorrect function. See the System Event Log for more information.

diskpart incorrect function

2. Diskpart has encountered an error: The device does not recognize the command. See the System Event Log for more information.

device does not recognize the command

When you get the similar error messages above, probably the Windows system does not has the ability to format the device with the Diskpart command line. You can open System Event Log to check the detailed issue and fix the problem.

3. It shows "There are no fixed disks to show"

no fixed disk

Usually, you may see this error message when you type list disk under Diskpart command. If you get this error message, probably the disk you want to format is corrupted and cannot be recognized by system.

==>> If you want to know why it failed to complete the format, please visit this page: Common reasons why Windows cannot complete the format

==>> Get more ways to format a disk when Diskpart failed to complete the format, please refer to: How to fix unable to format problem

Data Recovery after Diskpart Format or Clean

If you realize that you lose some important data after using Diskpart after cleaning or formatting USB drive, pen drive, external HDD, memory card or any device, you may use iCare Data Recovery to recover data after formatting.

Free Disk Drive/Memory Card Data Recovery Tool

download

Free Download Tool to Recover Data from Damaged Media, inaccessible drive, not formatted disk/usb/memory card.

Diskpart Is Unable to Format on Windows XP

Diskpart is a command prompt that can run under Windows XP operating system. You can run diskpart.exe to format partition, delete partition, create partition, etc on Windows XP, but the format feature is not available in Windows XP. In other words, you cannot run Diskpart command to format any internal hard disk partition or removable disk in Windows XP.

Pay attention: Windows XP does not allow its users to run Diskpart command to execute any operation on a removable device like memory card, USB drive, pen drive, external HDD.

Diskpart to Terminate Error Windows Was Unable Format

"Windows was unable to complete the format" is an error message showing up by Window platform when you try to format an internal hard disk or removable disk that turns to RAW file system and asks to reformat.  

When a digital device asks to reformat, the most common methods that many uses would like to use is to format the device in My Computer or Disk Management.

However, sometimes the format usually failed finally. If you encounter the similar problem on your computer, you can run Diskpart command to execute the format on your device. Sometimes, Diskpart command may work though format is not successfully in My Computer or Disk Management.

==> Please refer to Windows cannot complete the format for more information

What Is Diskpart?

Diskpart is a command line which works under Windows operating system to manage disk space such as create partition, merge partition, extend partition, format partition, delete partition, set active partition and so on.

diskpart

This page will introduce the "Format" function of Diskpart, with which you can format hard disk partition or memory card, USB flash drive on your Windows computer.

Last updated on 14/12/2020


Related Articles

Hot Articles

External Resource

Best File Recovery Software > Fix Errors > Diskpart to Format USB Flash Drive Memory Card Hard Disk Partition