Network Mapping on command line on Windows

Mapping a network drive on windows is very easy using UI tools. It goes this way…

  1. Open Windows explorer
  2. Go to Tools – Map Network Drive
  3. On new window select a letter as Mapped Network Drive (e.g. P: )
  4.  Select a network folder by browsing or just paste network path (e.g. \\hostname\FolderName) and click on Finish

Now you can see a new Drive in your explorer. But what if you want map a drive through a batch script? Yeah, you need to know a command to map network drive from command line. It goes this way.

To map a network drive from command line you need 2 inputs same as above.

  1. Drive Name (e.g. P: )
  2. Network Path (e.g. \\hostname\FolderName)

Now follow the steps below

  1. Go to run and type cmd
  2. On command line enter the following command

This will map your network drive. Now to make sure that you have mapped it correctly, type drive name and hit enter. E.g. P: hit enter. Now user dir command to list all directories and files. You can also go to explorer and check that new drive is available.

– Ashish Kulkarni


One thought on “Network Mapping on command line on Windows

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