|Dear all, |
I am having a trouble. I try to use the content of a variable as the name of a variable, in a loop.
When I do the following outside a loop, it works :
echo %ACC% >> access.log
echo !%ACC%! >> access.log
The last line actually prints out the content of VAR_1.
But when I try to put it into a loop it fails since I can not use the '%' character.
FOR /D %%g IN (*) DO (
echo !!TMP_PWD!! >> access.log
The last line prints out the name the variable and not its content.
Does anyone have an idea to help me solve this problem ?