How to Format USB in Command prompt in 2023? (Legal Methods)

Image by How to Format USB in Command prompt (Step by Step Guide)

Don’t need to explain, what is USB? USB is used for transferring important data from one PC to another. Further, when you connect the USB in one PC to another then a computer virus can enter through the USB in your computer. In this case, you need to Format USB.

Image by How to Format USB

There are several ways in which you can format a USB flash drive but sometimes the easy method doesn’t work and you can face problem-related to formating a USB. Here we discussed the three methods in which you could easily format a USB flash drive:

  • Format USB Normally
  • Format USB in CMD
  • Using Diskpart command
  • Using Disk management Tool.

Why do we need to format USB? When USB connects from one PC to another, there might be a virus and can transfer through the USB into your USB as well as PC. That’s the reason why you need to format your USB drive and clear it from viruses.

Format USB with Simple Method

When you need to format your USB, you can easily format it. We are going to tell you about the easiest method by which you will be able to format any USB. Follow the instruction that is mentioned below:

  • Connect USB with PC
  • Go into the “My PC
  • Right-click on the drive (Make sure your selected USB drive)
  • Click on the format.
Image via PC (Format USB with Simple Method)

First, you need to connect USB with PC, when USB is completely plugin then go into the “My PC” and select the USB drive. Then right-click on the drive that you want to format. Click on the format and wait few seconds.

Image via USB Format option

It takes some time and shows a popup (USB formatted). Might be its show some error like (windows was unable to complete the format). After showing this error message you can’t format USB with the simple method. If this method doesn’t work, don’t worry you have to use format USB with the help of the CMD method.

Format USB in CMD (command prompt) on Windows 10

If the first simple method doesn’t work, then you can use the command prompt (CMD) for formatting the USB flash drive. Here are further two methods that used for formatting USB flash drive:

  • Simple format command
  • Using Diskpart command.

Simple Format Command (Formatting USB)

You need to take some steps that are mentioned below, then you will be able to format USB by using the CMD:

  • Firstly, open the “command prompt”
  • Write the “CMD” in the search bar
  • Open the command prompt (make sure you opened the command prompt “Run as administrator”)
  • After that, you need to plug in a USB flash drive with a PC
  • Then you need to type “format /q /x H:
  • Command “q” for quick formatting, “x” is for descending the selected volume, and “H” is the assigned letter of the USB drive
  • You need to find the drive letter that is mentioned in the form of “C, D, E and so on” then writes in command
  • Then press the enter and might be this message will be shown there (Insert new disk for drive H: and press ENTER when ready)
  • Then you need to press the start button and it will take some time for formatting the USB.

Here is the detail:

You need to open the “Command Prompt” with the help of a search bar (ensure that you are opening the command prompt run as an administrator).

Image via command prompt

After this, you need to plug in your USB and type the “format /q /x H:” command. Then you need to find out your USB letter and enter it into the command. Press the enter button and wait for few seconds then the formatting process will be beginning and its take some time.

Image via command prompt (type the “format q x H” command)

After finishing the process your USB will be formatted. There will be no data remain in your USB, all data erased. Hope so this method will work, if not then you can follow the Diskpart command for formatting a USB flash drive.

Using Diskpart command

Here is the detail, using the Diskpart command in CMD. Follow the instruction then you will be able to format USB by using the Diskpart command:

  • Open the CMD (detail is mentioned above, how to open CMD with the permission of administrator)
  • Plugin the USB with PC
  • Write “Diskpart” in the Command prompt and press enter
  • Then you need to write “List disk
  • All disk show that available in PC windows
  • Select the USB drive that wants to format
  • Once you identify the drive then you have to write the “select disk <disk number>” command
  • Make sure you enter the correct disk number and press enter
  • Then write “clean” and press enter to continue the formatting process
  • After this, create a primary partition by using this command “create partition primary
  • Now you have to write the “format fs = NTFS quick” command
  • Command “format fs = NTFS quick” is for “NTFS file system”, you can also replace it with “FAT32
  • Replace NTFS with FAT32 use this command “format fs = FAT32 quick
  • The process is incomplete yet you have to select the drive letter for the USB flash drive. Otherwise, you will not be able to see the USB flash drive in the file explorer
  • Write the “Diskpart> assign” command
  • Windows will assign the drive letter to the USB drive
  • Then you need to close the Diskpart tool, just write “exit” in front of Diskpart and press enter to execute it
  • Now close the CMD by pressing on “X” button
  • After this, you can open the file explorer now and check all drives on the computer.

Here is the detail for formatting USB by using the Diskpart command:

Firstly, open the CMD and plugin USB with a laptop or PC. After that write “Diskpart” in the Command prompt and press enter for further process.

Second, give the command “List disk”, there will be show all disks that are available on your computer. Select the correct USB flash drive that you want to format.

Image via (give the command “List disk”)

Third, once you select the USB drive then you have to write the “select disk <disk number>” command. Make sure you select the correct drive number. you can identify by drive size. If you have a 30GB size USB, then select a 30GB size drive.

Fourth, write “Clean” and click on enter button for further process.

Image via write “Clean” and click on enter button for further process

Fifth, once you complete all steps then you need to create a primary drive by using this command “create partition primary”.

Sixth, after all this you have to write “format fs = ntfs quick” and if you want to replace NTFS with FAT32 then use this Command “NTFS file system”, you can also replace it with “FAT32” by using this command “format fs = FAT32 quick”.

Seventh, the process is incomplete yet you have to assign the drive letter for the USB flash drive. Otherwise, there will be no show on the USB flash drive in the file explorer. Write the “Diskpart> assign” command. Windows will assign the drive letter to the USB drive.

Image via Write the “Diskpart assign” command

At the end you need to Diskpart tool, for closing this you need to write “exit” in front of Diskpart and press enter to execute it. And for close the CMD press “X”. Now you can open the file explorer, check all drives on the computer.

I know are you think this process is long and hard but believe me formatting a completely USB flash drive with the help of the Diskpart command is a perfect and secure method. I’ve also used this method when other methods don’t work.

Formatting USB by using Disk Management Tool

Formatting USB by using Disk Management tool, follow the instruction that is mentioned below then you will be able to format 100% USB flash drive with the help of Disk Management tool:

  • Firstly, plug in the USB with a PC
  • Press the “Windows plus R” button to open the Run app in Windows 10
  • Type “msc” and press enter
  • Disk management tool will be open
  • Then right-click on the USB drive and press the button on the format from the list of options
  • Select the file system to format the USB drive, IT is either FAT32 or NTFS
  • Press Okay to confirmation for format USB

FAQs

What is the command prompt, and how can I format a USB drive using it?

The command prompt is a text-based interface in Windows that allows users to execute commands and perform various tasks. You can format a USB drive using the command prompt by entering specific commands, providing more control over the formatting process.

Is it legal to format a USB drive using the command prompt?

Yes, it is legal to format a USB drive using the command prompt, as it is a built-in feature of the Windows operating system. However, ensure you have the right to modify or erase the data on the USB drive.

Can I recover data from a USB drive after formatting it using the command prompt?

It may be possible to recover some data from a USB drive after formatting it using the command prompt. However, the success rate depends on various factors, including the file system used and whether new data has been written to the drive. Using a professional data recovery tool may increase your chances of recovering lost data.

Can I format a USB drive with different file systems using the command prompt?

Yes, you can format a USB drive with different file systems using the command prompt. The most common file systems are NTFS, FAT32, and exFAT. Replace the “fs=ntfs” part in the “format” command with your desired file system (e.g., “fs=fat32” or “fs=exfat”).

Can I format a USB drive with a specific allocation unit size using the command prompt?

Yes, you can format a USB drive with a specific allocation unit size using the command prompt. To do this, add the “unit=x” parameter to the “format” command (e.g., “format fs=ntfs quick unit=4096”), where “x” represents the desired allocation unit size in bytes.

Can I format a USB drive that is write-protected using the command prompt?

If a USB drive is write-protected, you might not be able to format it using the command prompt. However, you can try to remove the write protection first by using the DiskPart utility’s “attributes disk clear readonly” command or checking for a physical write-protection switch on the USB drive. Once the write protection is removed, you can proceed with formatting the USB drive using the command prompt.

Conclusion

Here are all detail and method by which you can easily format a USB flash drive. I’m personal these methods when I am unable to format my USB with the simple method. These all methods are safe and secure, make sure you follow all instructions carefully mentioned above. Use these methods, you will not see the “Windows cannot format the drive” message again while the formatting USB flash drive.

Related posts

How to Use a Facebook Video and Reel Downloader

OnlyMP3 Review: What You Need to Know About This Free YouTube to MP3 Tool

Common Mistakes to Avoid in a 360 Product Shoot