How to Format a Hard Drive using Command Prompt

There are many ways of formatting a drive, one of them is using command prompt. I will walk you through the steps of using the Microsoft command prompt Diskpart utility to Clean, format, and assign a drive letter using command prompt.

Right click Start > select Command Prompt (Admin).


Now type “DISK PART” Command Line and press Enter to start the Disk Part tool.


Next type “list volume” and press Enter to display a list of volumes. Here you can identify the volume we would like to format. On this tutorial ill be formatting “Drive F a USB” but the same applies to external or internal hard drives.

Note: Be careful selecting the wrong volume you might loose all data creating a huge disaster.


Type “select volume  [#]” and press Enter, [#] being the volume you wish to format.


Type “clean” and press Enter to remove all partition or volume formatting from the selected disk.


Type “create partition primary” and press Enter to create a primary partition on the current disk. Once the partition has been created, it’s possible to create multiple partitions if you want. To partition type size=[x] where [x] is the size in megabytes (MB) you would like the partition to be.


Type “format fs=ntfs quick label=USB” and press Enter to perform a quick format, using ntfs file system and labeling the drive “USB”. You may wish to use the fat32 file system instead of ntfs.


Lastly type “assign letter [z]” and press Enter, where [z] is the letter you would like to assign the drive.


Type “exit” command to close the Disk Part tool. You should be able to seesee the freshly formatted drive in My Computer, ready to use.


I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...

2 Responses

  1. murat says:

    Awesome that works Thank you!

  2. Dotun says:

    It worked well, Thanks.