Saved Bookmarks
| 1. |
Solve : Expand value of the variable name stored within another variable? |
|
Answer» Hello there, @echo off[/tt] Quote 1 MY_CORE_HOME[/tt] You need to invoke another level of nesting call set MY_%PKG_NAME%_HOME=c:\home call echo 1 MY_%PKG_NAME%_HOME etc what happens is that the %PKG_NAME% is evaluated and substituted into the expression dont forget to double-up the %s inside a batch file GrahamNice catch Graham so finally to transfer the content of the variable into a one that i can access at the FIRST level I do: >call set TEST=%MY_%PKG_NAME%_HOME% >set TEST TEST=c:\home then I can use TEST directly for my manipulation! Thanks PS: I had to add % to get it work (see above) |
|