Saturday, July 30, 2016

windows - How do you handle "CMD does not support UNC paths as current directories"?



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?


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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...