source: https://www.wikihow.com/Format-a-USB-Using-Cmd
A step-by-step guide to use the Command Prompt to reformat and clean a flash drive
- Plug your USB drive1 into your computer.
- Open Command Prompt as an administrator:
- Option 1: Go to the
Start
menu, typeCMD
, and select Run as administrator. - Option 2: Press
WIN + R
, typecmd
, and press↵ Enter
.
- Option 1: Go to the
- Type
diskpart
and press↵ Enter
. - Type
list disk
and press↵ Enter
. - Type
select disk [Your disk]
and press↵ Enter
. - Type
clean
and press↵ Enter
. - Type
create partition primary
and press↵ Enter
. - Type
format fs=ntfs
and press↵ Enter
. - Type
assign letter=[letter]
and press↵ Enter
. - Type
exit
and press↵ Enter
.
Referencse: