search for > cmd
run as Administrator
or use file explorer and find cmd file, use right mouse button and select Run as administrator
Once command line is open, type **diskpart**
and press Enter.
Po włączeniu wiersza poleceń, wrowadź komendę **diskpart**
i zatwierdź klawiszem Enter
c:\windows\system32 > diskpart
The above command will open a Diskpart window. In this window, type list disk
and press Enter.
It will list all the available drives.
DISKPART> list disk
select disk #
`# stands for number of disk
DISKPART> select disk 2
Now type 'select disk (disk number)' as shown above.
Specify the drive number which needs to be formatted.
In this step, type clean
. This command will permanent delete all files and folders, and successfully clean up the disk.
DISKPART> clean
DISKPART> create partition primary
To make the drive again accessible, type create partition primary
You can set size of partition with commend:
create partition primary size=100000
DISKPART> list partition
DISKPART> format fs=ntfs quick
Now format the drive with FAT or NTFS file system. Type format fs=ntfs
and press Enter.
If you need to format a hard drive partition to FAT32 or other file systems, replace NTFS with FAT32, exFAT, etc.
**Difference between a "format fs=ntfs" and a "format fs=ntfs quick" **
"When you choose to run a regular format on a volume, files are removed from the volume that you are formatting and the hard disk is scanned for bad sectors. The scan for bad sectors is responsible for the majority of the time that it takes to format a volume.
If you choose the Quick format option, format removes files from the partition, but does not scan the disk for bad sectors. Only use this option if your hard disk has been previously formatted and you are sure that your hard disk is not damaged."
WARNING
If you accidentally input format without fs=ntfs quick or fs=fat32 quick
in DiskPart command prompt, it will execute a full format on your selected hard drive partition.
This command will erase all saved data sector by sector. In other words, you'll permanently lose all erased data on the disk with no recovery chance.
DISKPART> assign
To assign a drive letter, you can type 'assign' as shown below.
You can assign specyfic letter for each volume:
DISKPART>
list volume
select volume 2
assign letter=z
Along with your list of disks, you can also ask Diskpart for a list of detected volumes.
At the “DISKPART>” prompt, type list volume:
DISKPART> list volume