Page 1 of 1

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

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

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.
Examples: "MacOS X - Your question", "MS Word - Your Tip or Trick".

Please note that switching to another language when reading a post will not work!
Posts will not have a translated counterpart.




RSS Feed

Home Forums Software Windows Software Windows – How to map a network drive from the command prompt

Tagged: , , ,

This topic contains 0 replies, has 1 voice, and was last updated by  hans 3 years, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • 5064

    hans
    Keymaster

    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.100\Development /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.100\Development /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.

Viewing 1 post (of 1 total)



You must be logged in to reply to this topic.