To assign, change, or remove a drive letter

Using the Windows interface

1.

Open Computer Management (Local) 

2.

In the console tree, click Disk Management.

Where?

Computer Management (Local) > Storage > Disk Management

3.

Right-click a partition, logical drive, or volume, and then click Change Drive Letter and Paths.

4.

Do one of the following:

To assign a drive letter, click Add, click the drive letter you want to use, and then click OK.

To modify a drive letter, click it, click Change, click the drive letter you want to use, and then click OK.

To remove a drive letter, click it, and then click Remove.

 Important

Be careful when making drive-letter assignments because many MS-DOS and Windows programs make references to a specific drive letter. For example, the path environment variable shows specific drive letters in conjunction with program names.

Top of pageTop of page

Note

To open Computer Management, click Start, and then click Control Panel. Click Performance and Maintenance, click Administrative Tools, and then double-click Computer Management

You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure. 

A computer can use up to 26 drive letters. Drive letters A and B are reserved for floppy disk drives, but you can assign these letters to removable drives if the computer does not have a floppy disk drive. Hard disk drives in the computer receive letters C through Z, while mapped network drives are assigned drive letters in reverse order (Z through B).

You cannot change the drive letter of the system volume or boot volume 

An error message may appear when you attempt to assign a letter to a volume, CD-ROM drive, or other removable media device, possibly because it is in use by a program in the system. If this happens, close the program accessing the volume or drive, and then click the Change Drive Letter and Paths command again.

Windows 2000, Windows XP, and allow the static assignment of drive letters on volumes, partitions, and CD-ROM drives. This means that you permanently assign a drive letter to a specific partition, volume, or CD-ROM drive. When you add a new hard disk to an existing computer system, it will not affect statically assigned drive letters.

You can also mount a local drive at an empty folder on an NTFS volume using a drive path instead of a drive letter. For more information, see Related Topics.

Using a command line

1.

Open Command Prompt

2.

Type:

diskpart

3.

At the DISKPART prompt, type:

list volume

Make note of the number of the simple volume whose drive letter you want to assign, change, or remove.

4.

At the DISKPART prompt, type:

select volume n

Select the volume, where n is the volume's number, whose drive letter you want to assign, change, or remove.

5.

At the DISKPART prompt, type one of the following:

assign letter=L 

Where L is the drive letter you want to assign or change.

remove letter=L 

Where L is the drive letter you want to remove.

ValueDescription

list volume

Displays a list of basic and dynamic volumes on all disks.

select volume

Selects the specified volume, where n is the volume number, and shifts the focus to it. If no volume is specified, the select command lists the current volume with focus. You can specify the volume by number, drive letter, or mount point path. On a basic disk, selecting a volume also gives the corresponding partition focus.

assign letter=L

Assigns a drive letter, L, to the volume with focus. If no drive letter is specified, then the next available drive letter is assigned. If the drive letter is already in use, an error is generated.

remove letter=L

Removes the drive letter, L, from the volume with focus. If no drive letter or mount point is specified, then DiskPart removes the first drive letter or mount point it encounters.

The remove command can be used to change the drive letter associated with a removable drive. You cannot remove the drive letters on system, boot, or paging volumes. In addition, you cannot remove the drive letter for an OEM partition, any GPT partition with an unrecognized GUID, or any of the special, non-data, GPT partitions such as the EFI system partition.

Top of pageTop of page

Note

To open command prompt, click Start, point to All Programs, point to Accessories, and then click Command Prompt

You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure. 

A computer can use up to 26 drive letters. Drive letters A and B are reserved for floppy disk drives, but you can assign these letters to removable drives if the computer does not have a floppy disk drive. Hard disk drives in the computer receive letters C through Z, while mapped network drives are assigned drive letters in reverse order (Z through B).

You cannot change the drive letter of the system volume or boot volume 

An error message may appear when you attempt to assign a letter to a volume, CD-ROM drive, or other removable media device, possibly because it is in use by a program in the system. If this happens, close the program accessing the volume or drive, and then click the Change Drive Letter and Paths command again.

Windows 2000, Windows XP, and allow the static assignment of drive letters on volumes, partitions, and CD-ROM drives. This means that you permanently assign a drive letter to a specific partition, volume, or CD-ROM drive. When you add a new hard disk to an existing computer system, it will not affect statically assigned drive letters.

You can also mount a local drive at an empty folder on an NTFS volume using a drive path instead of a drive letter. For more information, see Related Topics.

For more information about DiskPart, see Related Topics.

Top of pageTop of page

Related Topics

DiskPart

Using NTFS mounted drives

Create a mounted drive


Top of pageTop of page