Monday, September 3, 2018

windows - Properly escaping a path with spaces in CMD shell



I have the following path:




"d:\workspace\Server trunk - CI\make\make & publish.bat"





However, when I try to execute this from a cmd shell, I get the error:




'd:\workspace\Server' is not recognized as an internal or external command, operable program or batch file.




What am I doing wrong? Is there a way to escape those spaces properly?


Answer



You need to quote everything bar the extension




"d:\workspace\Server trunk - CI\make\make & publish".bat

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...