title: Dynamic variable name in cmd.exe w/ command extensions
body: <p>I see this is a common theme, but I believe I have a unique problem.</p>
  
  <p>I want to use this technique of variable expansion, where you can use the ":" to substitute strings in expanded result (<em>the "&amp;" part being a trick to force command execution</em>)</p>
  
  <pre><code>echo %PATH:;=&amp;echo.%
  </code></pre>
  
  <p><strong>, but like this</strong>:</p>
  
  <pre><code>set VAR=PATH
  set DELIM=;
  set SUBST=echo.
  
  echo %VAR:%DELIM%=&amp;%SUBST%%
  </code></pre>
  
  <p>Well, I hope you get the point. The above is not valid code.</p>
  
  <p>Anyone has a clue?</p>
  
  <p>The example in the question should be considered generic, and not to be taken literally. The question is <em>can it be done</em> and <em>exactly how</em>?</p>