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
Startmenu, typeCMD, and select Run as administrator. - Option 2: Press
WIN + R, typecmd, and press↵ Enter.
- Option 1: Go to the
- Type
diskpartand press↵ Enter. - Type
list diskand press↵ Enter. - Type
select disk [Your disk]and press↵ Enter. - Type
cleanand press↵ Enter. - Type
create partition primaryand press↵ Enter. - Type
format fs=ntfsand press↵ Enter. - Type
assign letter=[letter]and press↵ Enter. - Type
exitand press↵ Enter.
Referencse: