0
在Windows系统变量,我有以下变量批处理文件 - 获取变量,从Windows环境中的字符串
X = 123 Data_123 = DDD:
我如何获得这个变量作为批次字符串菲力
所以在最后我想要得到的变量像 “数据” _%X%,我将获得价值DDD
我如何能做到这一点
在Windows系统变量,我有以下变量批处理文件 - 获取变量,从Windows环境中的字符串
X = 123 Data_123 = DDD:
我如何获得这个变量作为批次字符串菲力
所以在最后我想要得到的变量像 “数据” _%X%,我将获得价值DDD
我如何能做到这一点
@echo off
setlocal enabledelayedexpansion
set x=123
set data_123=hello
echo !data_%x%!
(有没有another method延迟扩展:
call echo %%data_%x%%%