Map to a shared drive using command prompt

Madhu.B.Rokkam
Posted by Madhu.B.Rokkam under Others category on | Points: 40 | Views : 1768
Basically we can create a Batch file and place the below code


echo check if G drive exists and if exists delete it or unmap it

IF EXIST G: GOTO DELG

:OPENG

REM ----------------------------------------Copying to Shared Folder-------------------------------------------

net use G: \\100.100.100.100\d$\Shared Password /user:UserId /persistent:YES
echo Drive G is successfully connected

echo Please wait Copying files from source to the destination
Copy/Y Source Path G:\
echo Files Copied successfully

net use G: /DELETE

Comments or Responses

Login to post response