I have a variable containing the name of an environnent variable. I would like to eval this value. For example:
:: TOTO_1_2 defined outside of batch file
set varName="TOTO_1_2"
echo %TOTO_1_2% :: Display env var
echo %%varName%% :: Broken
The idea is to pass the value of the env var pointed by varName to a command then.
Thank you
if you want to evaluate a evaluated variable, you have to parse it twice:
There are different possibilities to do that. Here are three of them: