Format an USB with the command line in windows


I needed to format a USB after putting an ISO in it, here's how it can be done.

Now in D.O.S write:

diskpart.exe

Now we are in the dispar utility so let's put the commands

list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 238 GB 6144 KB
Disk 1 Online 1943 MB 0 B

select disk 1
Disk 1 is now the selected disk.
clean
DiskPart succeeded in cleaning the disk.
create partition primary
DiskPart succeeded in creating the specified partition.
select partition 1
Partition 1 is now the selected partition.
active
DiskPart marked the current partition as active.
format fs=ntfs quick
100 percent completed
DiskPart successfully formatted the volume.
exit
Leaving DiskPart...

No comments: