| FORMAT | volume [ parameters ] |
| FORMAT Parameters | |||
|---|---|---|---|
| Parameter | Function | OS | Remarks |
| volume | Specifies the drive letter (followed by a colon), mount point, or volume name | All | |
| /1 | Format single sided | All | Diskettes only |
| /4 | Format 5¼" diskette at 360K (DS-DD) in 5¼" 1.2M (DS-HD) floppy drive | All | In MS-DOS 5+, use /F:360 instead (diskettes only) |
| /8 | Format 8 sectors per track | All | Functionally equivalent to /N:8 (diskettes only) |
| /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). 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 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. |
Windows 2000+ | |
| /AUTOTEST | Format without user interaction | MS-DOS 5+ | Cannot be combined with /Q parameter |
| /B | Reserve space to make disk bootable | MS-DOS 7.* (Windows 95/98) |
|
| /BACKUP | Format (diskette only) without asking to insert diskette and without asking if you would like to format another diskette | MS-DOS 3+ Windows NT4+ |
Functionally equivalent to OS/2's /ONCE parameter. Combined with the apropriate /F or /N and /T parameters and with /V:"" (specifies an empty volume label (1)) no user interaction is required at all. |
| /C | Check clusters that are marked as "bad" | MS-DOS 7.* (Windows 95/98) |
|
| /C | Files created on the new volume will be compressed by default | Windows 2000+ | |
| /F:format | Specify format in Kilobytes or Megabytes (e.g. 160, 180, 320, 360, 720, 1.2 or 1200, 1.44 or 1440, 2.88 or 2880 or 20.8) | All | If OS or country settings are uncertain, use the number of
Kilobytes instead of Megabytes to avoid use of decimal
separators at all. 20.8 MB option for Windows 2000+ only. |
| /FS:filesystem | Specify file system, e.g. FAT, FAT32, NTFS or HPFS | OS/2 Warp Windows NT4+ |
|
| /L | Unconditional or long format: performs a low level format on diskettes, checks sectors that were marked as "bad" | OS/2 Warp | Functionally equivalent to MS-DOS' /U parameter. For OS/2 /L is default when formating floppy disks, for harddisks /Q is default. |
| /N:sectors | Specify number of sectors per track | All | Diskettes only |
| /ONCE | Format (diskette only) without asking to insert diskette and without asking if you would like to format another diskette | OS/2 Warp | Functionally equivalent to MS-DOS' /BACKUP parameter (1) |
| /Q | Quick format (2) | MS-DOS 5+ OS/2 Warp Windows NT4+ |
/Q is default for MS-DOS 5+ For OS/2 /Q is default when formating harddisks, for floppy disks /L is default |
| /S | Make disk bootable and copy system files | MS-DOS 3+ | |
| /T:tracks | Specify number of tracks | All | Diskettes only |
| /U | Unconditional format: performs a low level format on diskettes, checks sectors that were marked as "bad" (2) | MS-DOS 5+ OS/2 Warp Windows NT4+ |
Functionally equivalent to OS/2's /L parameter |
| /V[:label] | Specify new volume label, ask for it if label is not specified (1) | All | /V without label specified is the default for MS-DOS 4+ |
| /X | Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid. |
Windows 2000+ | |
| /Z:n | Format FAT32 with cluster size set to n times 512 bytes | MS-DOS 7.1 (Windows 98) |
Hard disks > 512 MB only |
| Notes: | (1) | In MS-DOS and Windows, /V:"" can be used to specify no label
(actually an empty label). In OS/2 you have to redirect an empty line to the FORMAT command if you don't want a label:
VER | FORMAT A: /ONCE ....
|
| (2) | /Q, /U and user interaction in MS-DOS: (Quoted from an alt.msdos.batch newsgroup posting by "Outsider") If no sectors are marked "bad" use /Q or /Q /U If sectors are marked "bad" use /C /U to retest bad clusters No switches allows unformatting The /Q switch allows unformatting The /Q /U switches dis-allow unformatting; very fast The /C switch doesn't work with the /Q switch The /AUTOTEST switch skips user input, doesn't work with the /Q switch |