Small Batch file to Map a Network Drive

This one may be useful if you have more than one Pc in your home/office network and you would like to make a mapped network drive from the command line. This will allow you to save/open documents in most programs by simply going to the correct drive letter.

To map a network drive open up a command prompt and type:
net use z: \\servername\sharename

To remove the mapped network drive type:
net use z: /delete

You can substitute any unused drive letter in the above commands. Also tha bove command assume you have the correct windows permissions to the network share.

For more command line posts click here

Labels: ,