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 no translation for that post!
[Solved] Windows - How to map a network drive from the command prompt
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter
September 28, 2015 6:10 AM
I had forgotten about the good old "NET" DOS statement, until today ...
So i have a server at 129.168.1.100 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: \192.168.1.100Development /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: \192.168.1.100Development /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.