Why can’t I use the CD command to change directories to a Universal Naming Convention (UNC) path in a command window?

When you attempt to use the CD command to change directories to a UNC path, you receive the following error:

CMD does not support UNC paths as current directories.

Although you can map a drive, use the CD command to change to the new drive, then disconnect after you’re done working in the UNC location, this approach is cumbersome. A better approach is to use the Pushd command. For example,

pushd raptorshareshare

The Pushd command automatically maps a drive and navigates to it. If you run the “net use” command after you run Pushd, you’ll see a new drive mapping. After you’re done working in the UNC location, use the Popd command to navigate back to your original network location before you ran Pushd.

Leave a Reply

Your email address will not be published. Required fields are marked *