Format Command Availability
The format command is available from within the Command Prompt in all Windows operating systems including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and older versions of Windows as well. However, it’s only useful from within Windows if you’re formatting a partition that can be shut down, or in other words, one that isn’t currently dealing with locked files (since you can’t format files that are in use). See How to Format C if that’s what you need to do. Beginning in Windows Vista, the format command performs a basic write zero hard drive sanitization by assuming the /p:1 option. This isn’t the case in Windows XP and earlier versions of Windows. The format command can also be found in the Command Prompt tool that’s available in Advanced Startup Options and System Recovery Options. It’s also a DOS command, available in most versions of MS-DOS.
Format Command Syntax
format drive: [/q] [/c] [/x] [/l] [/fs:file-system] [/r:revision] [/d] [/v:label] [/p:count] [/?]
Format Command Examples
Here are some examples of how to use the format command:
Quick Format
In the above example, the format command is used to quick format the e: drive to the exFAT file system. Above is another example of the quick format command to format the g: drive to the NTFS file system.
Format and Write Zeros
In this example, the d: drive will have zeros written to every sector on the drive twice (because of the “2” after the “/p” switch) during the format, the file system will be set to NTFS, and the volume will be named Media.
Format to Same File System
Using the format command without switches, specifying only the drive to be formatted, will format the drive to the same file system it detects on the drive. For example, if it was NTFS before the format, it will remain NTFS.
Format Related Commands
In MS-DOS, the format command is often used after using the fdisk command. Considering how easy formatting is from within Windows, the command isn’t often used in the Command Prompt in Windows. Formatting a hard drive is unnecessary if you want to delete just a few files. The del command exists to remove select files from the command line.