{"id":1758,"date":"2016-05-03T15:05:01","date_gmt":"2016-05-03T20:05:01","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1758"},"modified":"2016-05-03T15:05:01","modified_gmt":"2016-05-03T20:05:01","slug":"accessing-network-file-shares-from-a-command-prompt","status":"publish","type":"post","link":"https:\/\/www.wildow.com\/blog\/?p=1758","title":{"rendered":"Accessing Network File Shares From A Command Prompt"},"content":{"rendered":"<h2><a href=\"http:\/\/www.adrianbanks.co.uk\/?p=41\">Accessing Network File Shares From A Command Prompt<\/a><\/h2>\n<p class=\"info\"><em class=\"date\">March 8th, 2007<\/em> <em class=\"author\">Adrian Banks<\/em><\/p>\n<p>If you&#8217;ve ever tried to access a network file share in a command prompt by simply using the <i>cd<\/i> command, you&#8217;ll know that it just complains that &#8220;CMD does not support UNC paths as current directories&#8221;. Well, there is a way to do it (two in fact):<\/p>\n<div class=\"syntax_hilite\">\n<div id=\"code-1\">net use z: \\\\machine\\share<\/div>\n<\/div>\n<div class=\"syntax_hilite\">\n<div id=\"code-2\">pushd \\\\machine\\share<\/div>\n<\/div>\n<p>Both of these approaches map the network share to a local drive letter that you can change to using the <i>cd<\/i> command.<\/p>\n<p>The first one can be combined with the <i>\/user<\/i> switch to provide additional user details:<\/p>\n<div class=\"syntax_hilite\">\n<div id=\"code-3\">net use z: \\\\machine\\share \/user:domain\\username<\/div>\n<\/div>\n<p>The bonus of using the <i>pushd<\/i> command over the <i>net use<\/i> 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 <i>popd<\/i> command to remove the mapped drive<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Accessing Network File Shares From A Command Prompt March 8th, 2007 Adrian Banks If you&#8217;ve ever tried to access a network file share in a command prompt by simply using the cd command, you&#8217;ll know that it just complains that &#8230; <a class=\"more-link\" href=\"https:\/\/www.wildow.com\/blog\/?p=1758\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1758","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1758"}],"version-history":[{"count":1,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1758\/revisions"}],"predecessor-version":[{"id":1759,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1758\/revisions\/1759"}],"wp:attachment":[{"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}