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
)
IF EXIST Z:\ServerA\SharedFolder\ (
echo “Z Drive Mapped”
) ELSE (
net use Z: \\192.168.1.1\SharedFolder /user:username password
)
Popularity: 20% [?]



