title: How to use environment variables in Path.Combine()?
body: <p>I am trying to read in from a file where a folder path is specified using environment variable shortcuts, like the following:</p>
  
  <pre><code>source          dest
  filename.ext    %programfiles(x86)%\FolderName\
  </code></pre>
  
  <p>I get the following error when trying to use Path.Combine() to concatenate this with a filename:</p>
  
  <pre><code>"Could not find a part of the path %programfiles(x86)%\FolderName\filename.ext"
  </code></pre>
  
  <p>Do I have to parse environment variables (like %programfiles(x86)% and %appdata%) out and manually replace them, or is there a another way to have these resolved? Seems like a common use case for copying files, e.g. patching.</p>