How to Format Hard Drive from Command Prompt in Windows 11, 10, 8, 7?

Learn to format hard drive from Command Prompt, thus you can still format hard drive successfully when it is not recognized and present as RAW in Windows 7, 8, 10, or 11.

Bryce

By Bryce / Updated on May 12, 2023

Share this: instagram reddit

Help! I’m unable to format my hard drive

Case 1: “To back up some files on my local disk, I connected an external USB hard drive to my computer. I was prompted to format it before using it. But when I tried to format it within File Explorer, I received an error message – Windows was unable to complete the format.

Windows Was Unable to Format the Drive

Case 2: My hard drive Windows installed is full, thus I want to format it and reinstall the operating system & applications. But when I format hard drive system partition in Disk Management, I found that the option of “Format…” grayed out.

Format hard drive from Command Prompt (CMD)

When the external hard drive becomes raw, it is possible that the file system of it is damaged. At this point, you can try to format disk from Command Prompt. It is not recommended to use “format f: /fs: ntfs” command to format hard drive, there are chances that it will fail. Follow the steps given below:

Note: Formatting will erase all data on the external hard drive. It is suggested to back up data to cloud or local disk.

In the Search box, input “command prompt”, right-click Command Prompt among listed results and choose “Run as administrator”.

In Command Prompt window, input “diskpart” and hit Enter key. Then, type the following commands in order and hit Enter after each one.

▪ list disk
▪ select disk m, “m” refers to the number of your disk that will be formatted
▪ clean
▪ create partition primary
▪ format fs=ntfs quick, where “ntfs” can be replaced with fat32 or exfat according to your own demand.

Format Hard Drive from Command Prompt in Windows

After successfully format the hard drive to a wanted file system, input exit, and hit Enter to close Command Prompt window. Then, assign a drive letter in Disk Management to it and you are able to access and open it from File Explorer to back up your files on the local disk.

PS.: You can follow the steps above to format SD card or USB flash drive from Command Prompt in Windows 7/8/8.1/10/11.

Format hard drive from Command Prompt in BIOS

If you use “format c: /fs:ntfs” to format hard drive Windows installed on from Command Prompt in Windows, you’ll receive see the message that Format cannot run because the volume is in use by another process when you format the volume that holds the operating system.

Unable to Format C Drive Command Prompt

Here you can format hard drive partition that contains operating system from Command Prompt in BIOS with Windows Setup CD/DVD. Let’s have a closer look.

1. Insert Windows installation media into the computer and boot from it.

2. Waiting for “Windows is loading files…” and “Starting Windows” screens to finish.

3. Determine “Language to install”, “Time and currency format” and “Keyboard or input method”; then, click “Next”.

3. In the first Windows installation screen, click “Repair your computer”. Then, select the operating system and click “Next” button.

4. In the Troubleshoot window, choose "Advanced options" and then choose“Command Prompt”.

5. In Command Prompt window, type “format c: /fs:ntfs” and hit “Enter”.

Format external drive or internal hard drive via AOMEI Partition Assistant

It is acceptable to format raw external drive from Command Prompt in Windows or format internal hard drive system partition from Command Prompt in BIOS. But for some users who are unfamiliar with computer knowledge, it is not so easy to operate. At this point, AOMEI Partition Assistant Standard is highly recommended due to its powerful functions and easy operating. Let’s see how it works.

Format raw external drive including external hard drive, USB flash drive and SD card

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Install and run AOMEI Partition Assistant. Right-click the external hard drive partition and choose “Format Partition”.

Step 2. In the following small window, choose one among listed file systems and click “OK”. You can also change cluster size or add partition label.

Step 3. Confirm the operation and click “Apply” and “Proceed” to execute it.

Format the partition holding operating system on the internal hard drive

Step 1. Connect a USB drive to your computer and run AOMEI Partition Assistant. In the main interface, click “Make Bootable Media” and follow the next prompts to create a bootable media.

Step 2. Reboot computer and enter BIOS to boot your computer from the bootable USB drive created via AOMEI Partition Assistant.

Boot from USB Drive

Step 3. Wait for the main interface of AOMEI Partition Assistant to appear. Right-click internal hard drive system partition and choose “Format Partition”. And the following steps are as same as formatting the partition on the external hard drive.

Conclusion

From all the above, you can realize how to format hard drive from Command Prompt in Windows or form BIOS. You can choose a proper way to format hard drive partition based on the specific situation. If you are a green hand in computer, you can turn to AOMEI Partition Assistant Standard to format external or internal hard drive simply and successfully. And you can make use of partassist.exe utility if you upgrade AOMEI Partition Assistant to Professional.

Bryce
Bryce · Staff Editor
Bryce is an editor of AOMEI Technology, he covers backup & restore, hard disk & partitions management, cloud files transfer, website & database backup and so on for AOMEI. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He would like to spend all time on reaserching computer problems. He is a very cute boy.