标签: batch-file
假设我有这个:
set X = ..
如何将其转换为绝对路径?你能写出它在剧本中的表现吗?
我尝试使用%~dpX,但是出现了此错误消息: The following usage of the path operator in batch-parameter substitution is invalid: %~dpX
%~dpX
The following usage of the path operator in batch-parameter substitution is invalid: %~dpX
答案 0 :(得分:1)
经过大量的搜索,我找到了一种方法:
for %%y in (%X%) do set X=%%~dpy