Format – A command to format a Disk/Floppy
Format command creates a new root directory and file system for the disk. It can also check for bad areas on the disk, and can delete all data on the disk. before using a new disk, we must first use this command to format the disk.
Syntax:
Format Volume Options
Options
/A:size | Overrides the default allocation unit size. Default settings are strongly recommended for general use. NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K. FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes). FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes). exFAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, 128K, 256K, 512K, 1M, 2M, 4M, 8M, 16M, 32M. |
/C | NTFS only: Files created on the new volume will be compressed by default. |
/D | UDF 2.50 only: Metadata will be duplicated. |
/F:size | Specifies the size of the floppy disk to format (1.44) |
/FS:filesystem | Specifies the type of the file system (FAT, FAT32, exFAT, NTFS or UDF). |
/N:sectors | Specifies the number of sectors per track. |
/P:passes | Zero every sector on the volume passes times. This switch is not valid with /Q |
/Q | Performs a quick format. Note that this switch overrides /P. |
/R:revision | UDF only: Forces the format to a specific UDF version (1.02, 1.50, 2.00, 2.01, 2.50). The default revision is 2.01. |
/S:state | Where “state” is either “enable” or “disable” Short names are enabled by default |
/T:tracks | Specifies the number of tracks per disk side. |
/V:label | Specifies the volume label. |
/X | Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid. |
volume | Specifies the drive letter (followed by a colon), mount point, or volume name. |
Note: FAT and FAT32 files systems impose the following restrictions on the number of clusters on a volume: FAT: Number of clusters <= 65526
FAT32: 65526 < Number of clusters < 4177918
Format will immediately stop processing if it decides that the above requirements cannot be met using the specified cluster size. NTFS compression is not supported for allocation unit sizes above 4096.
Example
This command will format Volume C
Format C: