title: Pass variables to "Execute Windows Batch Command" in Jenkins
body: <p>I need to pass the ${BUILD_NUMBER} to both nuget and to octo during a build in jenkins.</p>
  
  <p>I do not want to use a specific batch file</p>
  
  <pre><code>nuget pack -Version 1.1.${BUILD_NUMBER} 
  
  octo.exe push --package "C:\Jenkins\workspace\MyWorkspace\MyProject.1.1.${BUILD_NUMBER}.nupkg" 
  </code></pre>
  
  <p>How would I be able to parameterize the above commands to include the correct build number?</p>
  
  <p><strong>Solution</strong> :</p>
  
  <pre><code>nuget pack -Version 1.1.%BUILD_NUMBER%
  
  octo.exe push --package "C:\Jenkins\workspace\MyWorkspace\MyProject.1.1.%BUILD_NUMBER%.nupkg" 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YeeFQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YeeFQ.png" alt="enter image description here"></a></p>