title: TeamCity Command Line Runner: Setting and using variables
body: <p>Within a TeamCity project running on a windows agent, I would like to read the contents of a file and then create a directory based on the file contents.</p>
  
  <p>Performing this operation as a command line build step seems logical.  I have tried creating a local variable "VERSION" as well as a custom teamcity parameter, but I can't get either to work.  It does not seem that windows cmd variables are playing nicely with the TeamCity defined env and system variables.  I am using the following custom script:  </p>
  
  <pre><code>echo "Distributing"
  set VERSION=&lt; component_version.txt
  echo %VERSION%
  echo "Copying files to dir \path\to\dir\%VERSION%\"
  mkdir \path\to\dir\%VERSION%\
  </code></pre>
  
  <p>Any suggestions on how I can achieve this?</p>