How to Map Network Drives using Command Prompt

How to Map Network Drives using the Command Prompt (CMD)

In Networking by Danny SmithLeave a Comment

Network drives

There are various types of drives and one of them is the network drive. Network drives can be shared in the same local area network on various computers and devices.

These drivers are used to centralize the data on a certain system so that everybody on the particular network can access the drive and hence can also access the same information.

For example, it is used in corporate setups and various departments so that every employee has the same kind of information which is saved on a network drive rather than on a local drive.

This can be accessed only by the respective user of the device.

Mapped drives

The mapped drive is also a network drive, but it has a certain map location with a drive letter assigned to it.

Therefore, one will have a named network drive which can be accessed from any device on the same network.

Opening the named drive will open the network drive path easily and one can access the information that is actually stored on another device.

It is basically a shortcut to a drive that is located and created on the local network. It can also be used to access and view files that are stored and published on an FTP server or on a certain website from the same network.

One can easily remove and create mapped drives on their computer using Windows Explorer. A user can complete a simple process to map a certain network drive which is discussed further in the article.

How to map network drives using the command prompt?

One may think that mapping a network drive is difficult and cannot be done, but that is not the case. Using certain simple steps, a user can map a network drive cmd with precision.

It is of great use to have the skills to map the drive whether one is using it to operate on a home network or on the office network.

Related:  How to Check Data Usage on Android and Reduce it

Once a drive is mapped one can get permanent and complete access to a particular drive that is on a separate device or server but on the same network.

The drives which are mapped are connected to each other, even if the systems are shutdown or even when they are restarting.

The steps that one will have to follow to map a drive using command prompt are:

  1. First, one will have to open the command prompt window by either clicking on the start button and then choosing the run option and write cmd in it and press ok, or one can right click the start button and then select the command prompt option from the list.
  2. After the command prompt window is open, a DOS command will have to be written for mapping the drive. The command line that is to be written is:

net use x: \\computer name\sharename

The x: in the command line is basically the letter that is to be assigned to the network drive.

  1. If one wants only a certain number of people who can access the drive and not everyone on the network, then they will have to assign a command specifying the credentials which will be allowed using the map network drive command line username password. The net use command to map drive with username and password will be:

net use x: \\computer name\sharename /user username password

  1. If the user wants to make sure the connection made with the folder on the network drive is done permanently and that no restart or shutdown should be able to change that, then he/she will have to add persistent or /p to the command line to access map drive from command prompt. The command line for such will be:

net use x:\\computer name\sharename /P:Yes


net use x:\\computer name\sharename /PERSISTENT:Yes

  1. The mapped drives can also be deleted by using the command prompt by simply listing them and then deleting them using a simple command line once the work is done. The command line which not only accesses the mapped a drive from the command prompt, but also deletes them will be:


The command to delete only one mapped drive is:

net use x: /delete

The command to delete all the listed mapped drives will be:

net use * /delete


Why use network drives?

Some of the reasons why people tend to use a network drive rather than a local drive are:

  • Anybody on the same network can access the same files and can be shared among each other easily as well.
  • The operation and backing up of data and files on the drives becomes centralized and easy and also one can check the files and mirror them from time to time.
  • The user can add permissions and decide who can access, edit, and view the file to keep the specification active.


Why use mapped drives?

The reasons why one should use a mapped driver are discussed below:

  • One can store larger and bulkier files easily on the network of devices wherever there is more storage space because it can be accessed from other devices as well.
  • One can back up the files or data from the mapped drive in the same network.
  • One can also back up the files and data to the storage drive of another computer as well, which is in the same network using any local backup application. This will make the mapped drive a physically attached drive or external HDD.

Now that you know How to Map Network Drives using Command Prompt, you can read about how to map network drive in Windows 8 & Windows 8.1:

Leave a Comment