Accessing Network File Shares From A Command Prompt
March 8th, 2007 Adrian Banks
If you’ve ever tried to access a network file share in a command prompt by simply using the cd command, you’ll know that it just complains that “CMD does not support UNC paths as current directories”. Well, there is a way to do it (two in fact):
Both of these approaches map the network share to a local drive letter that you can change to using the cd command.
The first one can be combined with the /user switch to provide additional user details:
The bonus of using the pushd command over the net use command is that it will automatically change the current directory to the mapped drive (which will be the first unused drive letter available in reverse alphabetical order). Also, when finished with the network share, you can use the popd command to remove the mapped drive