假设我在批处理脚本中定义了以下变量:
set VariableFirst=value1
set VariableLast=value2
接着我在代码的另一部分设置了另一个变量。
set Type=First
我想访问%VariableFirst%
和%VariableLast%
其中之一,具体取决于变量%Type%
的值(类似于echo %Variable%Type%%
,但这不起作用)。在Windows批处理脚本中如何实现?