Can a mapped network drive be reconnected from the command line?
Posted
by
Stephen Jennings
on Super User
See other posts from Super User
or by Stephen Jennings
Published on 2009-10-08T03:50:11Z
Indexed on
2012/09/27
21:40 UTC
Read the original article
Hit count: 168
On a daily basis I find myself in the Windows command prompt needing to access a network drive that is mapped but disconnected. I have yet to find a command that will reconnect this drive without unmapping and remapping (which leads to a password guessing game, since I don't own these computers). I would also like to be able to script this so every night the drive is reconnected if it has become disconnected somehow.
The fastest solution I currently have is to:
- Type "
start.
" to open explorer, - Alt-D to focus the address bar,
- type the drive letter I want and press enter, and wait for it to display the drive contents,
- then finally, close explorer and go back to the command prompt.
I know it's a minor inconvenience, but I'm often doing this through a slow VNC or PCAnywhere connection where doing anything through GUI is awful, so I'm just wondering if there's a better solution.
© Super User or respective owner