Connect to a shared drive from command line

  • Thread starter Thread starter Bob
  • Start date Start date
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???
 
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
 
Back
Top