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

For an end-user, formatting the USB drive is easy. All you need to do is right-click on the drive, and select Format. However, if you want to format a USB pen drive using the Command Prompt, here is how you can do it in Windows 10/8/7.

Format USB Pen Drive using CMD

When using the Command Prompt,  you have two methods. One is using a simple format command while the other is using Diskpart. We will show both the processes.

  1. Using Format Command
  2. Using Diskpart tool.

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

1] Using Format Command

format USB Command Prompt

Plug in the USB drive you want to format, and open File Explorer. Identify the exact drive name of the USB drive. Make sure not to make any mistakes here. If you use an incorrect drive letter, you will end up formating another partition and lose all the data.

  • Make sure no copy process is in progress, and the drive is not open in the explorer.
  • Type CMD in the Run Prompt, and hit enter to open the Command Prompt.
  • Type FORMAT <Driveletter>: and hit the Enter key.
  • It will prompt you to enter a new disk for Drive I. Just hit the Enter key again.
  • If you get a prompt saying:

Format cannot run because the volume is in use by another process. Format may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N)

  • Enter Y, and it will dismount the volume to format it. Its because some process is still accessing it. Unmounting will make sure all the processes accessing the drive will stop.

If you want to format with your choice of options, we suggest you to reading everything about the Format command here.

2] Using Diskpart Tool

format USB Command Prompt

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

Diskpart Format USB Drive Windows 10 Command Prompt

  1. Type diskpart in the Run Prompt, and hit enter
  2. After the UAC, it will open the Command Prompt which is running this tool
  3. Type LIST DISK to list all the drives connected to the computer.
  4. Now insert the USB drive, and then rerun the command.
  5. This time you will notice an extra drive that you need to format. In my case, it is DISK 2
  6. Next type SELECT DISK 2, and you will get a prompt Disk 2 is now the selected disk.
  7. Type CLEAN, and hit the Enter key
  8. Then type CREATE PARTITION PRIMARY and hit enter
  9. Type Format fs=NTFS Quick and hit enter
  10. Type Assign and hit Enter key to assign a letter to the newly formatted drive.

Post completion of all the tasks, the USB drive will be formatted, and it will be empty. DISKPART tool works differently compared to the standard format option in Windows.

Posted by on , in Category Windows with Tags
Ashish is a veteran Windows, and Xbox user who excels in writing tips, tricks, and features on it to improve your day to day experience with your devices.