How to Format Windows XP From the Command Prompt

Whether you want to reinstall Windows XP cleanly or start off fresh with a new operating system, it is sometimes necessary or preferable to format your hard drive. Formatting a hard drive erases all data and prepares the drive for a particular type of file system. Although newer operating systems such as Windows XP and Windows 7 allow the option to format from within the operating system, formatting also can be accomplished from the command prompt.

Close up of computer disk
Formatting a hard drive erases all data.
credit: Ablestock.com/AbleStock.com/Getty Images

Step

Back up the data that is on the hard drive you want to format. Reformatting your hard drive will remove all of the data on the hard drive, so back up anything you want to keep.

Step

Click "Start" and click "Run." This will open the Run dialog box.

Step

Type "cmd" in the text field and press "Enter" or click "OK." This will open the command prompt.

Step

Type "format c:" into the command prompt and press "Enter." The computer will begin to format the hard drive.