How to format a USB flash drive using CMD

0
597
How to format a USB flash drive using CMD

Learn how to format a USB flash drive using CMD on a Windows system through this page. Command Prompt allows you to format write-protected, corrupted, unreadable and unrecognized USB, pen drive or memory card on PC and mobile.

Why you need to format a USB flash drive

In general, HDDs and SSDs are widely used for OS installation and data storage, and removable storage devices such as USB flash drives are more used for data transfer and storage.

Here are some reasons why USB users need to format their flash drives:

1. Invalid or unrecognized file system: USB becomes RAW and USB cannot be recognized by PC.

2. Corruption or virus infection: The USB flash drive is inaccessible or corrupted and the USB is write-protected.

3. Change the file system to suit your specific use. Format and copy the USB to NTFS, FAT32 or Ext 2/3/4.

This page mainly shows how to format a USB flash drive using the Windows built-in command prompt.

Caution:

All data stored on the USB drive will be removed during the formatting process, so make sure you have backed up or saved your important USB data to another safe location beforehand;

How to Format a USB Flash Drive Using Command Prompt

Applies to: Format USB to FAT32/NTFS, format RAW USB, repair damaged USB, etc.

Altogether, it goes through the entire format process in 8 steps, the time it takes depends on the capacity of the USB flash drive and the space used. (The following steps apply to Windows 10/8/7 PCs.)

Step 1: Type cmd in the search box and you will get the best match called Command Prompt. Right-click on it and select “Run as administrator”.

Step 2: In the command prompt window, type diskpart and press “Enter”.

Step 3 : Type list disk and press “Enter”. Check which disk is the USB flash drive according to the disk information list. For example, disk 2.

Step 4: Now type select disk 2 and hit “Enter”.

Step 5: Type clean  . Wait for the disk to be erased.

Step 6: Type create partition primary and press “Enter”.

Step 7: After diskpart has successfully created the specified partition , type format fs = ntfs and press “Enter”.

If you prefer a different filesystem format, change the NTFS command to your preferred format (eg fs=fat32).

The Linux file system Ext2/3 is not compatible with Windows OS, so you can use the UBS format tool in Part 2 to help.

Step 8: Type assign to add a drive letter to the flash drive.

Then exit DiskPart and save the data back to the USB flash drive.

Fix Error While Using DiskPart Format Command

If you get an error while using CMD to format your USB flash drive or other device, don’t worry. We have gathered two common errors that occur during the format process, and you can fix them according to the solutions provided.

Error 1: Diskpart format fs=ntfs stuck at 0, 10, 11, 12…

Don’t worry if the format process gets stuck on DiskPart as shown in the message. Wait for the process to complete.

Error 2: Diskpart encountered an error: Access is denied. See the system event log for details.

If you encounter this problem, please refer to this link to uninstall Diskpart. An access denied error occurred.

Formatting a USB flash drive in an easier way

Applies to: Format corrupted USB on all Windows OS, format USB to Ext2, Ext3, FAT32 USB to NTFS, USB to FAT32.

CMD can format a USB flash drive, but it also has its drawbacks. The import operation may result in data loss from other storage devices.

If you are interested in an easier and safer format tool, a free partition management program called EaseUS Partition Master can help you.

#1 Step:  Launch EaseUS Partition Master, right-click on the partition of the external hard drive/USB/SD card you want to format, then select the “Format” option.

Step 2:  Give the selected partition a new partition label, file system (NTFS/FAT32/EXT2/EXT3) and cluster size, then click “OK”.

#3 Step:  Click “OK” in the warning window to continue.

Step 4:  Click the “Run Task” button at the top left to review the changes, then click “Apply” to start formatting the external hard drive/USB/SD card.