Microsoft DOS format command
About format
Format is used to erase information off of a computer diskette or fixed drive.
Tip: Although the information appears to be erased, it is still possible for software recovery programs to recover information from a formatted drive. If you want to make sure no information can be recovered from the drive, use a software utility to make sure all data is erased and overwritten.
Availability
The format command is an external command that is available in the below Microsoft operating systems as format.com.
- All Versions of MS-DOS
- Windows 95
- Windows 98
- Windows ME
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
Format syntax
Windows Vista and later syntax
FORMAT volume [/FS:file-system] [/V:label] [/Q] [/L] [/A:size] [/C] [/I:state] [/X] [/P:passes] [/S:state]
FORMAT volume [/V:label] [/Q] [/F:size] [/P:passes]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors] [/P:passes]
FORMAT volume [/V:label] [/Q] [/P:passes]
FORMAT volume [/Q]
| volume | Specifies the drive letter (followed by a colon), mount point, or volume name. |
| /FS:filesystem | Specifies the file system (FAT, FAT32, exFAT, NTFS, UDF, ReFS). |
| /V:label | Specifies the volume label. |
| /Q | Performs a quick format. Note that this switch overrides /P. |
| /C | NTFS only: Files created on the new volume will be compressed by default. |
| /X | Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid. |
| /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. |
| /D | UDF 2.50 only: Metadata will be duplicated. |
| /L | NTFS Only: Use large size file records. By default, the volume will be formatted with small size file records. |
| /A:size | Overrides the default allocation unit size. Default settings Note that the FAT and FAT32 files systems impose the following restrictions on the number of clusters on a volume: FAT: Number of clusters <= 65526 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. |
| /F:size | Specifies the size of the floppy disk to format (1.44). |
| /T:tracks | Specifies the number of tracks per disk side. |
| /N:sectors | Specifies the number of sectors per track. |
| /P:count | Zero every sector on the volume. After that, the volume will be overwritten "count" times using a different random number each time. If "count" is zero, no additional overwrites are made after zeroing every sector. This switch is ignored when /Q is specified. |
| /S:state | Specifies support for short file names (enable, disable) Short names are disabled by default. |
| /I:state | ReFS only: Specifies whether integrity should be enabled on the new volume. The "state" is either "enable" or "disable" Integrity is enabled on storage that supports data redundancy by default. |
Microsoft Windows 2000 and Windows XP syntax
FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q] [/1] [/4]
FORMAT volume [/Q] [/1] [/4] [/8]
| volume | Specifies the drive letter (followed by a colon), mount point, or volume name. |
| /FS:filesystem | Specifies the file system (FAT, FAT32, or NTFS). |
| /V:label | Specifies the volume label. |
| /Q | Performs a quick format. |
| /C | Files created on the new volume will be compressed by default. |
| /X | Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid. |
| /A:size | Overrides the default allocation unit size. Default settings are strongly recommended for general use. NTFS supports 512, 1024, 2048, 4096, 8192, 16 K, 32 K, 64 K. FAT supports 512, 1024, 2048, 4096, 8192, 16 K, 32 K, 64 K, (128 K, 256 K for sector size > 512 bytes). FAT32 supports 512, 1024, 2048, 4096, 8192, 16 K, 32 K, 64 K, (128 K, 256 K for sector size > 512 bytes). Note that the FAT and FAT32 files systems impose the below restrictions on the number of clusters on a volume: FAT: Number of clusters <= 65526 FAT32: 65526 < Number of clusters < 268435446 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. |
| /F:size | Specifies the size of the floppy disk to format (160, 180, 320, 360, 640, 720, 1.2, 1.23, 1.44, 2.88, or 20.8). |
| /T:tracks | Specifies the number of tracks per disk side. |
| /N:sectors | Specifies the number of sectors per track. |
| /1 | Formats a single side of a floppy disk. |
| /4 | Formats a 5.25-inch 360 K floppy disk in a high-density drive. |
| /8 | Formats eight sectors per track. |
Microsoft Windows 2000 and Windows XP recovery console syntax
Formats a disk for use with Windows 2000.
format [drive:] [/q] [/fs:file-system]
| drive: | Specifies the drive to format. |
| /q | Performs a quick format. |
| /fs:file-system | Specifies the file system to use (FAT, FAT32, or NTFS). |
Microsoft Windows 95, 98, ME syntax
Formats a disk for use with MS-DOS.
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]
| /V[:label] | Specifies the volume label. |
| /Q | Performs a quick format. |
| /F:size | Specifies the size of the floppy disk to format (such as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88). |
| /B | Allocates space on the formatted disk for system files. |
| /S | Copies system files to the formatted disk. |
| /T:tracks | Specifies the number of tracks per disk side. |
| /N:sectors | Specifies the number of sectors per track. |
| /1 | Formats a single side of a floppy disk. |
| /4 | Formats a 5.25-inch 360 K floppy disk in a high-density drive. |
| /8 | Formats eight sectors per track. |
| /C | Tests clusters that are currently marked "bad." |
Format examples
Caution: When using the format command, remember all information on the drive you want to format will be completely erased.
format a:
Would erase all the contents off a floppy disk. Commonly used on a diskette that has not been formatted or on a diskette you want to erase.
format a: /q
Quickly erases all the contents of a floppy diskette. Commonly used to quickly erase all information on the diskette.
format c:
Erase the contents of your C: hard drive. In other words, unless you want to erase all your computer's information, this command should not be done unless you're planning to start over.
Note: If you're in Windows or files on the hard drive are in use, this command will not work. If you want to format the primary hard drive you'll need to boot from a bootable diskette, restore disc, or another bootable drive.
