By Emily / Last Updated October 28, 2019

When need to format USB drive using Command Prompt?

USB drive is a popular portable storage device that helps you to save valuable files. But it needs formatting from time to time for various purposes including freeing up disk space, deleting all data on the drive, removing write-protection from the USB, etc.

Most users would perform the formatting task in a traditional way: right click on the drive in the File Explorer and select “Format” option. Quite easy and effective! However, sometimes the formatting process gets stuck in the middle and throws weird error messages like “Windows was unable to complete the format”. In this situation, you can try formatting USB drive in Command Prompt.

How to format USB using CMD Windows 7/8/10?

Command Prompt (also called CMD) is a command line interface in Windows. It can execute every entered valid command. To execute the format command on USB drive, follow the below steps.

Warning: Ensure you have backed up any necessary files from the USB drive already as the steps below will delete all data from it.

Step 1. Connect the USB drive to your Windows 7 computer and make sure it is recognized successfully.

Step 2. Search for “cmd” in the “start” menu, right-click on Command Prompt and select “Run as Administrator.”

Step 3. In the Command Prompt window, type “diskpart” command and press “Enter” to run the Diskpart tool to format USB drive.

Step 4. Now, you are inside the Diskpart utility. Execute “list disk” command to list all the disks in your system.

Step 5. From the disk list, find out the target USB drive by disk size. Then type “select disk” and press Enter.

Note: Replacewith your USB drive disk number. Ensure you select the correct disk number.

Step 6. Then type “clean” and press “Enter” to clean the chosen USB drive.

Step 7. After cleaning the drive, type “create partition primary” and press “Enter” to create the primary partition.

Format Drive CMD

Step 8. Now you can type “format fs=ntfs quick” to format your USB drive to NTFS. Also, you can replace “ntfs” with “fat32” or “exfat” to format it to FAT32 or exFAT.

The steps of how to format USB using CMD Windows 7 can be applied to format corrupted or damaged hard drive. But if you need to format a write protected USB, you have to add the command “attributes disk clear readonly” between “select disk” and “clean” commands in order to first remove read only property.

Better tool to format USB drive more flexibly

Command Prompt is a great choice when you cannot format USB drive in File Explorer, but there will be times when it fails. For example, when you try to format a large hard drive, which is over 32GB in size, the formatting process won’t continue and error message “The volume is too big for FAT32” will pop out. Besides, without a clean graphical user interface, there is always a risk that you type a wrong disk number and lose important data.

So, we prepare a better tool to get things done. You can format your USB drive by using AOMEI Partition Assistant Standard. It works well on all versions of Windows 10/8/7/XP/Vista. With an intuitive interface, you can easily choose the right hard drive to format. Most important, it is able to format large hard drive like 64GB, 128GB or even 2TB to FAT32 with ease. Free download this formatting tool and see how it works.

Step 1. Install and run AOMEI Partition Assistant, right click the USB drive and choose “Format Partition”.

Format Partitoin

Step 2. In this window, choose a file system from the File System drop-down and click “OK”.


Step 3. Back to the main interface, click “Apply” to actually formatting the USB drive.


See, within three clicks and steps, you can format USB drive. So if you are not familiar with how to format USB using CMD Windows 7/8/10, you can rely on AOMEI Partition Assistant. Besides formatting partitions, this versatile freeware even allows you to copy partition which cannot be finished in CMD. For more amazing functions such as migrating OS to SSD/HDD, recovering missing partition, securely erasing SSD drives, you can upgrade to AOMEI Partition Assistant Professional.