Page 1 of 1

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is most likely no translated for the post!

Windows - How to ma...
Clear all

Windows - How to map a network drive from the command prompt  


Noble Member Admin
Joined: 7 years ago
Posts: 1437
September 28, 2015 6:10 AM  

I had forgotten about the good old "NET" DOS statement, until today ...
So i have a server at with a share called "data".
Say my username is "hans" and my password is "secret", then this DOS statement will map it to my "X:" drive:

net use x: \ /USER:hans secret

AFAIK, this drive letter will disappear after logging off or rebooting.
If you'd like to keep it more permanent, then use:

net use x: \ /USER:hans secret /PERSISTENT:YES

Note that you can paste this in a "mapdrive.bat" file on your desktop (handy in corporate settings, with laptops that need mappings at home). You can double click it next time to right away map a drive.
Make sure that the X: drive does not exist of course.