What is a USB flash drive?
USB flash drive is a secondary storage device, that is portable and rewriteable. Transferring files from one pc to another is now easy and fast. There are instances where some viruses corrupted the USB flash drive. The easy process of formation a USB through file explorer, gives an error message, sometimes. So here you can learn how to format USB in CMD.
To format a USB, a command prompt (CMD) is the best method. There are two methods to format a USB in (CMD). One of them is simple Format Command, and the second one is a Diskpart Command.
Formatting USB in CMD (Format Command)
- Open a command prompt by typing CMD in the search bar.
- Click windows key+R to open the Run app.
- Open the command prompt.
- Then plug in a USB flash drive.
- Now type format /q /x H: to format USB.
- Check the drive letters of USB and press enter.
- When a message appears from the system then press enter again.
- If you want to enter the volume label write /v:
- If you do not want to enter the volume label then just press enter.
- The system will format your USB.
Formatting USB in CMD (Diskpart Command)
- Open Command Prompt and run it as administrator.
- Plug in USB into your computer.
- Now we have to use Diskpart by writing diskpart.
- Press enter.
- Now write command List disk and a list will appear.
- Identify your Flashdrive from the list.
- Then write your disk number and press enter.
- Now execute the Clean command to format your USB by typing clean and then press enter.
- Then, create a primary partition by writing “create partition primary” and a partition will be created.
- Type format fs=ntfs quick. The windows will format the USB quickly.
- Now assign the drive letter by writing the following command Diskpart>assign.
- Exit the command prompt by typing exit.
Hope this guide will help you to understand how to format USB in CMD.