Dealing with UNC Paths

Picture this scenario, you’re trying to run some  Command-prompt commands and to do so you need to set your current directory to a share drive path. You think to yourself that it should be the easiest thing in the world so you type something like:

cd \\my_share-drive\a_random_folder\shady_picture_files

You are happy and optimist about life until you get  the message:

CMD does not support UNC paths as current directories

Fortunately the solution is quite easy, at least, according to wikipedia , in windows 7 and later. You just need to use pushd instead of  cd like this

pushd \\my_share-drive\a_random_folder\shady_picture_files

How do you go back?

just use popd

And there you go, now you can do all kinds of crazy stuff with your files.

I hope you find this useful, and don´t  thank me, thank this guy


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s