Windows: how to mount remote directory
2018-05
We can use the command pushd to mount/map a remote directory through windows command line.
This is the syntax:
PUSHD [path | ..]
path Specifies the directory to make the current directory.
If Command Extensions are enabled the PUSHD command accepts network paths in addition to the normal drive letter and path.
If a network path is specified, PUSHD will create a temporary drive letter that points to that specified network resource and then change the current drive and directory, using the newly defined drive letter.
Temporary drive letters are allocated from Z: on down, using the first unused drive letter found.
Example:
C:\Users\gnetto\Desktop>pushd \\myad\directory
Z:\USERS13\gnetto\config\Desktop>
And to unmap the virtual drive and return to your previous local path, you can use the command popd.