If you’re looking to clean your USB drive, remove viruses, or get rid of any files, formatting your Pendrive is the best solution. Using Command Prompt (CMD) to format a USB drive can sound technical if you’re not familiar with it.
But don’t worry. In this article, I’ll guide you through each step in simple terms, and by the end, you’ll be able to do this like a pro. But, Before we begin, let’s understand why CMD can be a great option for formatting.
It offers more control over the formatting process and is particularly useful when traditional methods (like using File Explorer) fail due to errors or other issues.
Also read, How To Fix Your Corrupted Sd Card or Pendrive
Why Use CMD to Format a USB Drive?
CMD allows you to bypass the typical graphical interface and directly access the system commands to format a drive. Here are some common reasons to use it:
- Unrecognized USB drives: Sometimes, a USB won’t show up properly in File Explorer, but CMD can still detect it.
- Error messages: If you encounter errors like “Windows was unable to complete the format,” CMD can be a lifesaver.
- Dealing with viruses and corrupted files: Formatting with CMD can help remove stubborn viruses or files that can’t be deleted normally.
Prerequisites Before Formatting
Before we dive into the steps, make sure you have:
- A backup of your data: Formatting will erase all data on the pen drive.
- Administrator access: CMD requires administrator privileges to format drives.
- Pendrive connected properly: Double-check that the USB drive is securely inserted.
Step-by-Step Guide to Formatting a USB Drive Using CMD
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.
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.
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.
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.
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)
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.
Step 2: Now Choose a new partition label, file system (NTFS/FAT32/EXT2/EXT3), and cluster size for the selected partition, then click “OK”
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
Troubleshooting Common Issues
1. CMD Not Recognizing Disk
If the list disk doesn’t show your USB drive, try these steps:
- Disconnect and reconnect the USB.
- Try a different USB port or check for hardware issues.
2. Access Denied Errors
Make sure you’re running Command Prompt as an administrator. If problems persist, try disabling any antivirus software temporarily, as it may block Diskpart from making changes.
3. Disk Is Write-Protected
If you get a “Disk is write-protected” error, open CMD and use the following command to remove write protection:
- Type attributes disk clear readonly and press Enter.
This will remove write protection and allow you to proceed with the clean and format commands.
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
Q: Will formatting a USB drive with CMD remove viruses?
A: 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.
Q: Which is better: NTFS or FAT32?
A: NTFS is better for Windows compatibility and larger file handling, but FAT32 is more universally compatible with non-Windows devices.
Q: Can I recover data after formatting the USB drive?
A: 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.
Q: What does “clean” do in CMD?
A: The clean command in Diskpart removes all data and partitions on the drive, resetting it to a raw state.
Further Reading
- How To Fix Google Play Store Download Pending Issue
- How to Remove api.cactus-search.com Browser Hijacker
- How to Disable Hyper-V on Windows 10 and 11