How to Format USB Flash Drive Using Command Prompt?

author Written By Deep Sikha
author Approved By Sonika Rawat
Updated on 11th Sep 2024
Reading Time 8 minutes

Getting errors when trying to format your USB flash drive? In this blog, you will learn how to format a USB flash drive using cmd in various versions of Windows. You can format a write-protected, corrupted, or inaccessible USB flash drive or pen drive using the command prompt. Furthermore, we will get to know how to recover data using the Removable Media Recovery Tool. But before that, let’s start with understanding drives and their need to format.

An Overview

The most widely used storage devices nowadays are SSDs and HDDs. These are set on a Mac or PC to store data files and install the OS. Additionally, some other devices have more flexibility and distinctive features. These are storage devices that can be removed, such as USB flash drives. However, there must be a valid file system in drives, irrespective of type, to be recognized and used by Windows. Further, let’s learn the causes for formatting the USB drive.

Why Format USB Flash Drive?

Some significant reasons and situations arise for the need to format a USB drive, such as:

  • To fix the 0x0000004E error, handle the corruption and other bug issues.
  • It enhances the compatibility and gets maximum storage on the drive.
  • Also, it is required to keep files secure and improve the drive performance.
  • Moreover, after formatting, the drive can be swiftly used on different operating systems.

How to Format Corrupted or Damaged USB Flash Drive?

With the usage of flash drives, some bad sectors and corruption issues arise on USB flash drives. But, don’t worry, you can fix any memory drive by formatting it. Formatting is always a good way to be free from unwanted viruses/malware or errors. But, the question arises, how to format a USB flash drive? Well, in the following section, we will discuss manual and professional solutions. Here is the detailed procedure that you should follow.

Format USB Flash Drive Manually Using CMD

This method involves three different steps that need to be executed in sequence. In addition, you must run the command prompt for this method.

Step 1: Scan the USB drive and Remove Viruses

Connect your USB flash drive to the computer. Now, right-click on it and enable your Antivirus to scan it manually. If any virus is found on your system, then remove it using the Antivirus.

Step 2: Format the USB flash drive

There is a Windows built-in disk-partitioning tool as Diskpart which can be accessed through the Command Line Utility. It gives complete information about the volumes and partitions, allows deletion and creation, and extends the NTFS volumes. Follow these steps:

  1. Open Command Prompt, and type Diskpart.
    img
  2. Type list disk in the diskpart window and press Enter.
    img
  3. It will show two available disks: a Hard Disk Drive (HDD) as Disk 0 and a USB Flash Drive as Disk 1.
  4. Further, type SELECT DISK 1 and press Enter. It will show that Disk 1 is now the selected disk.
    img
  5. Subsequently, type clean to clear any issues present in it and press Enter.
    img
  6. Type create partition primary and press Enter
    img
  7. Next, type format fs=ntfs and press Enter.
    img
  8. Lastly, type exit to close the window.

Alternate Manual Method to Format the USB Flash Drive

Before you format it, check the file system. So, you can go through these steps.

  • In Windows Explorer, right-click the USB flash drive and select the Properties option.
  • Next, in the General tab, you can see that the File system is NTFS
    img
  • Now, close the properties window. Right-click on the USB drive again and select the option Format.
  • Further, in the File system, select NTFS, and click on Start to proceed.
  • At last, a warning window will appear. Click OK to confirm.
    img

Using the above steps, you can successfully format a USB flash drive. However, this method has some limitations. It requires technical knowledge and takes time. Moreover, what if you want to restore your data stored in that drive, in case you don’t have a backup? Don’t worry, you can take the help of the below suggested expert-recommended automated tool.

Dedicated Tool to Restore Data from Removable Media

Generally, it is found that when you format a USB flash drive, you lose your crucial data. Either it gets completely lost or is damaged. But it can be protected and recovered with the right tool. The SysInfo Removable Media Data Recovery is the best-automated software to recover all your precious data. All the common file formats are supported in it. It can be used without any technical expertise. Also, it has some advanced features, that make it a reliable option, such as:

  • It supports data recovery from both partition tables, MBR, and GPT.
  • Provides various recovery modes and auto-search features for files.
  • Compatible with all Windows operating systems, including the latest Windows 11.

Steps to Recover USB Flash Drive Data

  1. Install and run the Removable Media Recovery tool.
  2. Afterward, choose a desired drive or volume and hit the Next button.
  3. Now, review the volume information displayed on the screen and click Next.
    img
  4. Next, pick a recovery mode: Standard, Advanced, or Deep, and hit Next again.
    img
  5. Further, the scanning process will begin. Expand the tree format to view folders and select the files that you want to be saved.
  6. Subsequently, click the Save button to recover the data successfully.
  7. Select the destination to save the output file and hit the OK button.
  8. At last, once the process is complete, again click OK.
Conclusion

Recovering data from external memory drives requires a reliable and proven solution. In the blog, we explored cmd and other manual methods to format USB flash drives. Also, we learned about a professional tool for recovering our data securely and seamlessly. Besides the methods, we have also explored the different reasons for formatting. Hope that it helped to resolve your problem.

Frequently Asked Questions

Q1. How can I format a USB drive using cmd?

Ans. Follow the given steps to format a USB drive using cmd:
  1. Open the command prompt, type diskpart, and press enter.
  2. Type list disk > Enter > type select disk 1 (Replace 1 with the number of your USB drive.) Again, press Enter.
  3. Now, type clean > Enter > type create partition primary > Enter.
  4. At last, type format fs=ntfs and then press Enter.