How to format USB Pen Drive using Command Prompt in Windows 10

format USB Command Prompt

For an end user, it is easy to format the USB drive. All you have to do is right-click on the player and select Format. However, if you want to format a USB key using the command prompt, here's how to proceed under Windows 10/8/7.

Format a USB key with CMD

When you use the command prompt, you have two methods. One uses a simple formatting command while the other uses Diskpart. We will show both processes.

  1. Using Format Order
  2. Using Diskpart tool.

When you use the Diskpart tool, you will need administrator privileges. You can also use PowerShell instead of CMD.

1) Using the Format command

Plug in the USB drive that you want to format and open the File Explorer. Identify the exact name of the USB drive. Make sure you make no mistake here. If you use an incorrect drive letter, you will form another partition and lose all data.

  • Make sure that no copying process is in progress and that the drive is not open in the explorer.
  • Type CMD in the prompt and press Enter to open the command prompt.
  • FORMAT type : and press the Enter key.
  • You will be prompted to enter a new drive for drive I. Press the Enter key again.
  • If you receive a prompt saying:

The format can not be executed because the volume is being used by another process. The format can be executed if this volume is unmounted first.
ALL OPEN HANDLES OF THIS VOLUME WILL THEN BE INVALID.
Do you want to force a descent on this volume? (WE)

  • Enter Y and he will dismount the volume to format it. This is because a process always accesses it. Disassembly will ensure that all processes accessing the drive will stop.

If you want to format with your choice of options, we advise you to read everything about the Format order right here.

2) Using Diskpart Tool

format the USB command prompt

DISKPART is a powerful tool that you can use to manage all partitions from the command line. Before you run this tool, be sure to remove the USB drive.

Diskpart USB Disk Command Prompt Windows 10

  1. Type disc part in the prompt, and press Enter
  2. After the user account control, it will open the command prompt that runs this tool.
  3. Type DISC LIST to list all the drives connected to the computer.
  4. Now insert the USB drive and rerun the command.
  5. This time, you will notice an additional disk that you must format. In my case, it's DISK 2
  6. Next type SELECT DISK 2and you will get a prompt. Disc 2 is now the selected disc.
  7. Type CLEANand press the Enter key
  8. Then type CREATE PARTITION PRIMARY and press Enter
  9. Type Format fs = Fast NTFS and press Enter
  10. Type Attribute and press the Enter key to assign a letter to the newly formatted drive.

Once all the tasks are completed, the USB drive will be formatted and empty. The DISKPART tool works differently than the standard Windows formatting option.

Ashish is an experienced Windows and Xbox user who excels in writing tips, tricks and features that enhance your everyday experience with your devices.

Leave a Reply