How To Format A Hard Disk Drive With Command Prompt

Publish in Software May 31, 2015

Partitions, disks or volumes and any storage devices is formatted from the help of command "Diskpart" at the Windows command prompt and Diskpart is not only do format but it is also do many things with hard drive or storage device like activating or inactivating, attributes, detail of partitions, disks or any storage devices, extending of size, deleting, creating, converting into GPT or MBR, assigning, etc. if you want to take another action with hard drive or another device so you can also get all list of commands with the help of this command "help" and now we have to do format of hard drive so we shall use a simple command of "format" in Diskpart but we can’t directly use command "format" because first we use this command "clean" which permanently delete your all data or partitions from hard drive. Although you can also format your hard-disk drive without using of command-prompt yet this article will clearly describe you that how to properly format a partition or any-storage-device.

find and note the disk no

1. Note the disk number which has to format: Go to “Manage” of “This PC” by right clicking of the mouse and go to “Disk Management” under the option of Storage and then note the number of disk which want to do format.

open command prompt (cmd)

2. Open the Command prompt: Click “Start Menu” then first open the “Run” then type “cmd” or “cmd.exe” into the form then click “Ok” to open command prompt and then your command prompt will be begun.

start the diskpart

3. Start the Diskpart: You will need to type this command “diskpart” at command prompt as you can see in the image then press the Enter then it will ask you that do you want to allow this program to make changes to this computer? And then you’ll have to click button of “Yes”. If you don’t click on it, you won’t be able to access Diskpart.

list of all disk in command promt

4. Get list of all disks: Type “list disk” to get list of all disks or any storage devices. If you don’t want to format disk or want to format partitions, volumes or virtual disk so you can also get list of volumes, partition or virtual disk. Keep in only one thing in your mind. If you do any spelling mistake with the commands so you’ll be frustrated.

There are list of commands to get list of partition, volume or virtual disk.

  • Type “list partition” => this command will give list of all partitions.
  • Type “list volume” => this command will give list of all volumes.
  • Type “list vdisk” => this command will give list of virtual disks.
disk selection in command prompt

5. Select the disk: You must select a disk for formatting otherwise, “format” command will not work and format command can very harmful for you so you should select carefully of disk.

Type “select disk ###” and wait for message that “Disk 1 is now the selected disk” and enter carefully the number of disk. If you enter wrong number of disk so you could lost your important data or whatever in another hard drive and you’ve to type disk number at the end of command as you are seeing in the image.

remove partition or volumes in cmd

6. Remove partitions or volumes: Type “clean” command to remove all configuration information, partitions or volumes of disk and press the Enter and then everything will be deleted from the disk.

create partition primary

7. Create partition primary: You need to type “create partition primary” and press the Enter and then primary partition will be created.

formatting with cmd

8. Formatting: Now type “format fs=fat32 quick label=formatting” and press enter.

assign of disk in cmd

9. Assign of disk: Type “assign letter=h” and press the Enter and now your hard drive has been formatted. You just need to type “exit” to close command prompt.

Helpful or Not

Yes No

Connect with Social

Quizhow facebook
Quizhow twitter
Quizhow Google Plus