Windows – How to handle “CMD does not support UNC paths as current directories”

directoryuncwindowswindows-command-prompt

I am attempting to change directories to a file server such as:

cd \\someServer\\someStuff\

However, I get the following error:

CMD does not support UNC paths as
current directories

What are my options to navigate to that directory?

Best Answer

If you're considering scripting it, it's always helpful to learn about the pushd and popd commands. Sometimes you can't be sure what drives letters are already used on the machine that the script will run on and you simply need to take the next available drive letter. Since net use will require you to specify the drive, you can simply use pushd \\server\folder and then popd when you're finished.