Connect to a shared drive from command line

B

Bob

I want to create a batch file so that users can easily
connect to a specific shared drive on the network. Any
offers???
 
H

Herb Martin

set domain=SpecificServerOrUsersDomain
net use * \\SpecificServer\SpecificShare * /user:%domain%\%username%

If you know the user is already authenticated, just omit the second "*"
and everthing following.

net use * \\SpecificServer\SpecificShare

If you wish to "pick" the drive letter, then substitute that for
the first "*".

net use s: /d 2>nul
net use s: \\SpecificServer\SpecificShare
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top