Windows – Change Your Drive Letter using the Command Prompt

For whatever reason your drive letters have changed on your Windows PC which is bad news if you are running SQL Server databases on that drive.  We want to reassign the drive letter using command prompt only. Begin by opening a command prompt.

We will need to launch the diskpart utility from the command prompt.  Type :


Type the following to return a list of volumes on your machine :

list volume

Under the column “Volume ###” will be a list of volumes by Volume name, and under the column “Ltr” will be the currently mapped drive letter.  Select the Volume you want to change the drive letter for e.g. to select volume 3 … :

select volume 3

Now change the drive letter to for example, “d”, by issuing the command :

assign letter = d

Thats it, but you will need to restart the machine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s