Map Network Drive

Sometimes, when need to copy files over the network, I will integrates this small portion into the batch job to map drive automatically.

@echo off
IF EXIST Z:\ServerA\SharedFolder\ (
echo “Z Drive Mapped”
) ELSE (
net use Z: \\192.168.1.1\SharedFolder /user:username password
)

Popularity: 12% [?]

This entry was posted in DOS Batch and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>