开发者

Setting environmental variable in batch as a path (not working for me) on Windows

I want to set my folder C:\Users\开发者_Go百科scruff\Desktop\MinGW2\Cross as variable PREFIX

So I type:

set PREFIX=C:\Users\scruff\Desktop\MinGW2\Cross

But then when I do:

cd PREFIX 

I get

"The system cannot find the specified path". 

When I do

echo %PREFIX%

I get:

C:\Users\scruff\Desktop\MinGW2\Cross 

when is do:

cd C:\Users\scruff\Desktop\MinGW2\Cross

it takes me to the cross directory fine.

:(


Try cd %prefix%.

DOS/Windows batch files aren't really very clever, you might want to investigate Powershell as an alternative: http://technet.microsoft.com/en-us/scriptcenter/dd742419

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜