Professional Documents
Culture Documents
DISKPART
LIST Disk
LIST Partition
LIST Volume
SELECT Disk=n
SELECT Partition=n
SELECT Volume=n_or_d (Number or Drive Letter)
DETAIL Disk
DETAIL Partition
DETAIL volume
CONVERT basic
CONVERT dynamic
CONVERT gpt
CONVERT mbr
CLEAN [ALL] (remove all partition and volume info from
the hard drive)
FORMAT [{fs=ntfs|fat|fat32] [revision=x.xx] |
recommended}]
[label="label"] [unit=n] [quick] [compress]
[override] [nowait] [noerr]
When setting up a new drive, create in this order: Create Partition, Format drive,
Assign drive letter.
The diskpart commands may be placed in a text file (one command per line)
and used as an input file to diskpart.exe:
Example:
SELECT DISK=0
CREATE PARTITION PRIMARY
SELECT PARTITION=1
FORMAT FS=NTFS LABEL="New Volume" QUICK
ASSIGN LETTER=E
EXIT
noerr - This option is for scripting only. With noerr set, when an error is
encountered, DiskPart will continue to process commands as if the error did not
occur. Without this parameter, an error causes DiskPart to exit with an error
code.
When selecting a volume or partition, you may use either the number or drive
letter or the mount point path.