How to Format a Hard Drive With Command Prompt

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
You can use the command prompt to format a hard drive.

The command prompt in Windows is one of the quickest ways to format a hard drive. In fact, it might be the only method available, if you find that you are unable to start your computer except in Safe Mode or you are booting with a floppy disk or CD because you have not yet installed Windows. Format a hard drive to remove existing files from the disk and prepare it for use.


Step 1

Open the "Start" menu if you are able to load the Windows desktop. Click "Computer" and a list of your computer's hard drives recognized by Windows will be displayed. Note the letter assigned to the hard drive that you want to format, such as "D:" or "E:." Note the volume label, too, which might be "Local Disk" or "New Volume." Close the window. If you are unable to load the Windows desktop, skip to Step 3.


Video of the Day

Step 2

Open the "Start" menu again and type "cmd" (without quotes) in the search box. Press "Enter." Windows displays the command prompt.

Step 3

Type "format (drive letter)" at the command prompt and press "Enter." If you want to format drive "D:", for example, type "format D:" and press "Enter."


Step 4

Type the volume label that you noted in Step 1, if applicable, and press "Enter."


Step 5

Type "Y" to confirm that you want to proceed. Press "Enter" to format the hard drive.


Step 6

Type a new volume label for the hard drive and press "Enter." Alternatively, press "Enter" without typing a volume label to skip naming the hard drive.




Report an Issue

screenshot of the current page

Screenshot loading...