• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows 11
    • Linux
    • Mac & Apple
You are here: Home / System Admin / Windows 11 / How To Format USB Drive from Command Line

How To Format USB Drive from Command Line

May 9, 2021 by jerry23

Formatting a USB Drive can be pretty straightforward. You plug in the USB drive and find it Windows File Explorer, and right-click > Format. While do this via GUI is simple and easy, if you want to repeat this for several USBs or automate this action, you probably want to do that via the command line to run as a batch script.

Today we will go over how to format USB drive via the command line.

Type “DISKPART” and Hit Enter, from the diskpart prompt, type “list disk” and hit enter. This should give you something look like below.

Microsoft DiskPart version 10.0.21364.1

Copyright (C) Microsoft Corporation.
On computer: AMDRYZEN3

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online         3726 GB      0 B        *
  Disk 1    Online          931 GB      0 B
  Disk 2    Online          232 GB      0 B        *
  Disk 3    Online           14 GB  3072 KB
  Disk 4    Online           14 GB      0 B

DISKPART>

1. Select disk x (x represents your USB drive)*

For the example here my disk is #4, it should look something like below.

DISKPART> select disk 4

Disk 4 is now the selected disk.

DISKPART>

2. Clean > Enter

3. Create partition primary > Enter

4. Active > Enter

5. Format fs=ntfs > Enter

6. Exit > Enter

It should look something like below. Note here I chose to format in NTFS you may use format such as FAT32 etc.

DISKPART> Clean

DiskPart succeeded in cleaning the disk.

DISKPART> Create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> format fs=ntfs

   90 percent completed

This is the walk through on how to format USB drive via command line.

The post How To Format USB Drive from Command Line appeared first on Next of Windows.

Related posts:

  1. How To Partition USB Drives In Windows 10 Using Disk Management
  2. A comparison of GPT and MBR partition structures
  3. List of DISKPART commands and How to use them in Windows 11/10
  4. Migrate Windows 10 To Solid State Drive (SSD), Using The EaseUS Partition Master
  5. How to mirror Boot Hard Drive for UEFI on Windows 10
  6. SD Card won’t format on Windows 11/10 [Fixed]
  7. Running out of storage? Try these tips to free up space on Windows 10
  8. Essential command tools to fix virtually any networking issue on Windows 10
  9. The ultimate guide to fixing problems with the May 2020 Update
  10. How to Install Windows After Ubuntu Linux in Dual Boot

Filed Under: Windows 11 Tagged With: command, drive, format:, from, line

Primary Sidebar

Popular Posts

  • What Is Shader Compilation and Why Does It Make PC Games Stutter? 2.1k views
  • 3 Ways to Disable GetApps on Xiaomi, Redmi, and Poco Phones Running MIUI 500 views
  • Enable or Disable Adjust for Daylight Saving Time in Windows 10 400 views
  • How To Restore Last Session On Google Chrome 300 views
  • How to Highlight Duplicates in Google Sheets 300 views
  • Exclamation Mark on Network Signal, Mobile Data Not Working? 8 Ways to Fix 300 views
  • How do I enable or disable Alt Gr key on Windows 10 keyboard 300 views
  • How to Block TLS 1.0 and TLS 1.1 in Microsoft Edge and Google Chrome 200 views
  • How to delete Downloaded, Failed & Pending Windows Updates 200 views
  • Dual Booting Ubuntu With Windows 10 Pro With BitLocker Encryption 200 views
  • What is "Workspace Trust" in Visual Studio Code? 200 views
  • How to change Outlook Navigation Pane position 200 views
  • Fix Explorer.exe Application error on Windows 10 200 views
  • LiVES Video Editor 2.8.5 Adds Experimental Wayland Support 200 views
  • Microsoft Store Error 0x80D03805 on Windows 10 200 views
  • Is Outbyte PC Repair Safe? 200 views
  • Will PS5 Play PS4 and PS3 Games? 200 views

Footer

Tags

Amazon android Apple Asus available download: edge feature features first free from galaxy Game games gaming gets google install Intel iPhone launches linux Microsoft more OnePlus phone release released review: samsung series support this Ubuntu update using video watch what will windows with xbox your

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org