开发者

How do I turn the content of a var in an absolute path?

Suppose I have this:

set X = ..

How do I turn that later into an absolute path? Can you please write how it would be in a script?

I 开发者_如何学编程tried with %~dpX , but that gave this error message: The following usage of the path operator in batch-parameter substitution is invalid: %~dpX


After a lot of searching, I figured out a way of doing this:

for %%y in (%X%) do set X=%%~dpy
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜