How To Format Pendrive Using CMD – Step By Step Guide

In Short
  • You can format a pen drive using CMD to fix errors, remove viruses, or create a bootable drive.
  • To do this, open CMD as administrator, use the diskpart command and select the correct disk to clean and format it.
  • You can also use the EaseUS Partition Tool for easy formatting with a simple click.

Have you ever faced a situation where your USB drive refuses to format via the usual right-click method? Or maybe you have been infected with a virus that has made your files unreadable? If you are wondering how to format a pen drive using CMD, you are at the right place.

Formatting a USB drive using the Command Prompt (CMD) is one of the best methods of formatting a USB drive, particularly when it becomes corrupted or has errors. In this article, I will show you step-by-step How To Format Pendrive Using CMD.

Also read, How To Fix Your Corrupted Sd Card or Pendrive

Why Format a Pendrive Using CMD?

Before we move on to the steps, let’s quickly understand why formatting a USB drive via CMD is sometimes better than using the regular Windows formatting tool:

  • Fixes corrupted USB drives: CMD can remove stubborn errors that the normal format option cannot remove.
  • Removes viruses: If your USB is infected with a virus, CMD can completely erase all unwanted files.
  • Creates bootable drives: CMD allows you to format and prepare your USB for a bootable installation.
  • Works when the GUI fails: Sometimes, Windows cannot format a USB drive through File Explorer, but CMD can.

Before You Begin: Important Precautions

Before we proceed, a small caution – formatting erases everything on your USB drive. If you have important files, back them up. Trust me, you don’t want an “Oh no! I lost everything” moment.

Now, let’s get to it.

How To Format Pendrive Using CMD – Step-By-Step Guide

So here are the full steps to format the PenDrive using CMD. Just read the complete information and follow all the steps.

Step 1: Press Win + S to open the search bar. Type “cmd” in the search bar. Then, right-click on Command Prompt and select Run as administrator.

Step 2: After that, Type diskpart and press Enter. This will start the Diskpart tool.

dispart CMD

Step 3: Now type “list disk” and press Enter. You’ll see a list of drives connected to your computer, like Disk 0, Disk 1, etc.

List disk command

Step 4: Once you’ve identified your USB drive, type select disk X, replacing X with the disk number of your USB (e.g., select disk 1), then press Enter.

Step 5: After that, Type clean and press Enter. This command will wipe everything on the drive, removing all partitions and files. You’ll see a confirmation message saying, “DiskPart succeeded in cleaning the disk.

Select your disk and type clean

Step 6: Now, we need to set up the drive again. Type create partition primary and press Enter.

Step 7: Once the partition is created, it’s time to format it. Type format fs=ntfs quick and press Enter. If you want other file format systems such as fat32, exfat, etc. then replace the command with fs=ntfs to other systems.

create partion command

Step 8: Finally, assign a drive letter to make the USB accessible in File Explorer. Type assign and press Enter.

DiskPart will confirm with a message like “DiskPart successfully assigned the drive letter or mount point.” Congratulations, Your USB drive is now formatted and ready for use.

Method 2: Format Pendrive Using Command Prompt

Here is another method to format your pen drive. I am using a command prompt to format the pen drive in this method.

Step 1: Insert your Pen Drive into the system and check the path of the drive (e.g. – C/D/E/F) that you want to format.

Step 2: Now open the Windows command and click Run as Administrator.

Step 3: Type command format F: and press Enter button (In my case, the drive path is F)

format pendrive using command prompt

Step 4: After that, it verifies your pen drive. Click on enter after successful verification.

It will take a few minutes to complete the process. Now you have successfully formatted your pen drive.

Method 3: Format Pen Drive Using EaseUS Partition Tool

Another method I recommend you try is the EaseUS partition tool, a professional tool that can help you format your Pen Drive, resize, create, delete, merge, split, copy partitions, and many other things.

Step 1: Launch the EaseUS Partition Master tool, right-click on the drive or Pendrive that You Want To Format, and choose the “Format” option.

Format Pen Drive Using ease us software

Step 2: Now Choose a new partition label, file system (NTFS/FAT32/EXT2/EXT3), and cluster size for the selected partition, then click “OK”

Choose a new partition label, file system, cluster size

Step 3: In the Warning Menu, click “OK” to continue.

Step 4: Click on the “Execute Operation” button in the top-left corner to see the changes, then click “Apply” to start formatting your Pendrive

click execute operation to complete the format

Conclusion

Formatting a pen drive is not a big problem. Nowadays many people are searching for a way to format a pendrive using Cmd. So, in this article, I have shared all the methods by which you can format a pen drive using Cmd. Just follow all the steps given above and you will successfully format your pen drive.

FAQs

Will formatting a USB drive with CMD remove viruses?

Yes, formatting erases all data, including viruses and malicious files. However, if the virus has affected system files on your computer, you may need additional antivirus measures.

Which is better: NTFS or FAT32?

NTFS is better for Windows compatibility and larger file handling, but FAT32 is more universally compatible with non-Windows devices.

Can I recover data after formatting the USB drive?

Once formatted, recovering data becomes challenging. If you need to recover data, consider using specialized recovery software immediately and avoid further changes to the drive.

What does “clean” do in CMD?

The clean command in Diskpart removes all data and partitions on the drive, resetting it to a raw state.

Further Reading

Altaf Hassan a tech and gaming enthusiast with over 4 years of experience. He likes writing about tech, games, android tips, and how-to's. He loves playing games and learning new things about tech. That's why he created this website to share information.

Leave a Comment

Share via
Copy link