Files Software

How to Format a Disk Using Command Prompt


  • Formatting erases data: Make sure all important data on the disk is backed up elsewhere.
  • Double check drive letter: Mistyping the drive letter can lead to disastrous unintended formatting.


1. Open Command Prompt as Administrator:

  • Search for “cmd” in the Start Menu.
  • Right click on “Command Prompt” and select “Run as administrator”.

2. List Disks with diskpart:

  • Type diskpart and press Enter.
  • Type list disk and press Enter to list all connected disks.

3. Find your disk: Locate the disk you want to format by looking at its size and Disk #.

4. Select the disk:

  • Type select disk X (replacing *X* with the Disk # of your target disk) and press Enter.

5. Clean the disk (optional): This wipes the disk’s partition information.

  • Type clean and press Enter. This step is not always strictly necessary but can help if you face formatting problems.

6. Create a partition:

  • Type create partition primary and press Enter.

7. Format the partition:

  • Type format fs=file_system quick and press Enter.


  • file_system with your desired file system (for example ntfs, fat32, exfat)
  • quick performs a quick format. Remove for a full format (takes longer).

8. Assign a drive letter (optional):

  • Type assign letter=Z (replace *Z* with your desired letter) and press Enter.

Example: Format Disk 1 as NTFS with a quick format and assign the letter *E*

  • diskpart
  • list disk
  • select disk 1
  • clean
  • create partition primary
  • format fs=ntfs quick
  • assign letter=E
  • exit (to leave diskpart)

Advanced Use: Diskpart offers additional commands for finer grained partitioning and formatting control.

Use with caution: Incorrectly performed disk operations will lead to data loss.

Leave a Reply

Your email address will not be published. Required fields are marked *