The advanced guide on how to format pendrive using cmd

You have a corrupted USB drive and want to fix it? Then you are in right place. Because today I will tell you how to format Pendrive using cmd.

We usually use USB flash drives to store data or transfer data from one computer to another.

During this data transferring process, viruses enter into the pen drive from the computer. As a result, the pen drive going corrupted or damaged.

Also after a long time of use, a USB flash drive becomes a bad sector or corrupted. And you can solve all these issues by formatting the USB flash drive.

So the question here is how to format a USB drive. Right! Friends you can format a pen drive by windows default format option.

But sometimes you will get an error message during the formatting process. It shows windows was unable to complete the format.

In this case, you need to take the help of a command prompt (CMD) to format the USB drive.

Related reading: How to create a bootable pen drive for windows 10.

When you are going to format a USB drive using cmd there are two methods. One is using diskpart and another is simple format command. Here I discuss both methods.

Before applying the formatting process backup your important file from your USB drive. Because the formatting process will completely erase your data.

How to format pendrive using diskpart?

  • Step 1: Click on the search bar and type CMD. Now open the command prompt as an administrator.

The advanced guide on how to format pendrive using cmd

  • Step 2: After opening the command prompt window type Diskpart and hit “Enter key”.

The advanced guide on how to format pendrive using cmd

  • Step 3: Again type List Disk and hit Enter. You will find a list of disks connected with your pc. Check which disk is your USB flash drive. For me Disk 1.

The advanced guide on how to format pendrive using cmd

  • Step 4: Now type select disk 1 and hit the Enter key.

The advanced guide on how to format pendrive using cmd

  • Step 5: When you show a message that “disk 1 is now the selected disk” then type clean and hit Enter key. It will take some time for erasing the process.

The advanced guide on how to format pendrive using cmd

  • Step 6: Now type create partition primary and press the Enter key.

The advanced guide on how to format pendrive using cmd

  • Step 7: You will show a message that "diskpart succeeded in creating the specified partition". Now type format fs=ntfs and hit the enter key. It will format your drive in the NTFS file system. If you want another file system, change the command NTFS to fat32 or exfat.

The advanced guide on how to format pendrive using cmd

  • Step 8: After the formatting process, you need to generate a drive letter for your USB drive. Type Assign and press the Enter key.

How to format pen drive using format command?

  • First, insert your USB drive and check the drive letter that you want to format.
  • Now open the command prompt and run as administrator.
The advanced guide on how to format pendrive using cmd
  • Now type Format G: for normal format or type format /q /x G: for quick format. After that, press the Enter key (In my case drive letter is G).
  • Again hit the enter key. It will verify your USB drive and start formatting automatically. It can take few minutes depending on your flash drive capacity.
  • After completing the formatting process it will ask to enter the volume label. Input any name either press the enter button for none.

FAQ's

Friends below are some questions related to how to format pendrive using cmd in windows 10 or windows 7. Many people also ask for the answer. So I include them in this article for my readers.

Q1. how to format USB using cmd which is write-protected?

Friends you want to format a write-protected flash drive? Then you need to remove the write protection first.

Here are some of the reasons for the write protection of your USB drive. Below is the list:

The pen drive or card reader may be physically locked.
A computer virus can make your pen drive write-protected.

The advanced guide on how to format pendrive using cmd

If your USB drive or card reader physically locked then remove the locked to disable write protection.

Now the question is what to do if your USB drive is not physically locked? Don't worry! here the solution.

The advanced guide on how to format pendrive using cmd

Step 1: Frist open the command prompt as an administrator.

Step 2: Now type Diskpart and press enter key.

Step 3: Type list disk and hit the enter key again. It will show all the connected storage device lists.

Step 4: Type select disk 1 (For me: pen drive is in disk 1)

Step 5: Now type attributes disk clear readonly and hit the enter key.

Now the write protection is removed from your flash drive. You can easily format it. You can use the Windows default format option or command prompt.

Q2. How can I access pendrive from CMD?

To access your USB drive from cmd you need to know the drive letter. After that open cmd and type G: and hit the enter key (G is my USB drive letter).

Now type dir and hit the enter button again. It will show all the files and directories of your USB drive.

Q3. How do I fix windows unable to complete the format?

Sometimes our USB drive or pendrive going corrupted for viruses. Maybe after using long time some bad sectors create on it. And then when you want to use your USB drive, it will ask you to format it.

But when you try to format your pendrive it will show an error message that Windows was unable to format. So friends here I will tell you how you can fix this problem. Here's how:

  • First, open the Run dialog box (Windows key + R) and type diskpart.
  • Now type list disk and hit the enter key. You will find the all-connected disk list with your computer. Find your pendrive disk number.
  • Now type select disk 1 (For me disk 1 is my pendrive) and hit the enter button. You will show a message that disk 1 is now the selected disk.
  • Now type clean and press the enter key again. After that, a message will appear succeeded in cleaning the disk.
  • After that type create partition primary and press the enter key.
  • Then type active and hit enter.
  • Now you need to create a partition on your pendrive. To do that type select partition 1 and press the enter key.
  • then type format fs=fat32 and hit the enter button.
  • Now, wait till 100% for completing the format process. And after you will get your pendrive as usual.

Q4. What is a quick format?

Quick format is a method of format that quickly deletes files from the partition of your drive. But don't check the bad sectors in the drive. If you use any good recovery software, then you can recover your deleted files later.

Q5. Does formatting remove bad sectors?

Firstly you need to know that the bad sector cannot be repaired. The formatting process does not repair the bad sector. But yes formatting process identifies the bad sector and prevents any data from being written on it.

Final word

Friends, I think this step-by-step guide tutorial on how to format pendrive using cmd will help you to format any USB drive using the command prompt. By using this method you can easily format any corrupted, write-protected USB flash drive.

So friends if you like this tutorial then comment below about your opinion. So I that I can get motivated to bring more interesting article like this.  

Post a Comment