DISKPART FORMAT

Format a disk for use with Windows using the DISKPART command.

Syntax
      DISKPART FORMAT [[FS=FS] [REVISION=X.XX] | RECOMMENDED] [LABEL="label"] [UNIT=N]
            [QUICK] [COMPRESS] [OVERRIDE] [DUPLICATE] [NOWAIT] [noerr]

Key
   volume         A volume must be selected for this operation to succeed.

   FS=FS          The type of the file system (FAT, FAT32, exFAT, NTFS, UDF, ReFS).
REVISION=X.XX Specifies the file system revision (if applicable). RECOMMENDED If specified, use the recommended file system and revision instead of the default if a recommendation exists. The recommended file system (if one exists) is displayed by the FILESYSTEMS command. LABEL="label" Specify the volume label. UNIT=N Overrides the default allocation unit size. Default settings are strongly recommended for general use. The default allocation unit size for a particular file system is displayed by the FILESYSTEMS command. NTFS compression is not supported for allocation unit sizes above 4096. QUICK Perform a quick format. COMPRESS Files created on the new volume will be compressed by default. NTFS only. OVERRIDE Force the file system to dismount first if necessary. All opened handles to the volume would no longer be valid. DUPLICATE UDF Only: This flag applies to UDF format, version 2.5 or higher. This flag instructs the format operation to duplicate the file system meta-data to a second set of sectors on the disk. The duplicate meta-data is used by applications, for example repair or recovery applications. If the primary meta-data sectors are found to be corrupted, the file system meta-data will be read from the duplicate sectors. NOWAIT Forces the command to return immediately while the format process is still in progress. If NOWAIT is not specified, DiskPart will display format progress in percentage. NOERR For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without the NOERR parameter, an error causes DiskPart to exit with an error code.

Example

FORMAT FS=NTFS LABEL="SS64 Volume" QUICK COMPRESS
FORMAT RECOMMENDED OVERRIDE

"Successful people are successful because they form the habits of doing those things that failures don't like to do" ~ Albert Gray.

Related commands:

FORMAT - Format a disk.
DISKPART - Disk Administration.
Equivalent bash command (Linux): mkfs, in FreeBSD & OSX: newfs, fsck_exfat


 
Copyright © 1999-2021 SS64.com
Some rights reserved