title: Using the percent sign in TeamCity build scripts
body: <p>I am trying to set up a TeamCity build process that runs a custom command line script.  The script uses a variable so it needs a percent sign (e.g. <code>%x</code>).  But TeamCity uses percent signs for its properties (e.g. <code>%build.number%</code>), so the percent sign in the script gets removed when it runs.</p>
  
  <p>If the script contains this:</p>
  
  <pre><code>for /d %x in ("c:\*") do @echo "%x"
  </code></pre>
  
  <p>This is what it actually runs:</p>
  
  <pre><code>for /d x in ("\*") do @echo "x"
  </code></pre>
  
  <p>How can I write my script so it can include variables?</p>