How to use UNC paths inside Windows Command prompt? – List Of What

If you are reading this article which means you want to open a UNC path from the command prompt. Yes I also wanted to play with some UNC paths just before write this article.

I thought it will be good if I share that knowledge with you.

It’s easy just use “pushd” without quotes in front of the UNC path you want to use. This little command will assign your location as a temporary network location and will treat the location as a drive. To remove the network drive assignment you need to place “popd” at the end of the script.

pushd \\Server\my_share

          #Rest          #of          #the

          #script