Tip 10 : Use the PushD command to create a quick temporary drive map

1. Use the PushD command to create a quick
temporary drive map

Have you ever been working from a Command
Prompt and needed to temporarily map a drive letter
to a network location for a quick file operation? Of
course, you can switch over to Windows Explorer and
use the Map Network Drive command on the Tools
menu. While this is a viable solution, it requires
multiple steps to create-and then you have to perform
several more steps to disconnect the network drive.
This can be a pain, especially if you just want to work
from a Command Prompt. However, there is another
way. You can use the PushD command to quickly
create a temporary drive map while remaining in the
Command Prompt. You can then use PopD to quickly
disconnect the network drive. Here's how:
1. Open a Command Prompt window.
2. Type the following command line:
PUSHD ServerSharepath
Where \\Server\Share\path is the network resource
to which you want to map a drive letter.
The PUSHD command will instantly map a drive
letter to the network resource and then change to that
drive right in the Command Prompt window. When
you're finished, just type POPD and the mapped drive
letter will be disconnected and you'll return to your
original drive. Keep in mind that, the PUSHD
command allocates drive letters from Z: on down and
will use the first unused drive letter it finds.

Courtesy : @internet.info

0 comments: