Diskpart

Microsoft Windows XP, Microsoft Windows XP OEM Upgrade

Creates and deletes partitions on a hard drive. The diskpart command is only available when you are using the Recovery Console.

diskpart [/add | /delete] [device_name | drive_name | partition_name] [size]

Parameters
NoneUsed without parameters, the diskpart command starts the Windows character-mode version of diskpart.
/addCreates a new partition.
/deleteDeletes an existing partition.
device_nameThe device on which you want to create or delete a partition. The name can be obtained from the output of the map command.

An example of a device name is:

\Device\HardDisk0
drive_nameThe partition you want to delete, by drive letter. Used only with /delete.

An example of a drive name is:

D:
partition_nameThe partition you want to delete, by partition name. Can be used in place of the drive_name. Used only with /delete.

An example of a partition name is:

\Device\HardDisk0\Partition1
sizeThe size, in megabytes (MB), of the partition you want to create. Used only with /add.

Examples

The following examples delete a partition:

diskpart /delete \Device\HardDisk0\Partition3

diskpart /delete F:

The following example adds a 20 MB partition to your hard drive:

diskpart /add \Device\HardDisk0 20

Information in this document was provided by the manufacturer.