title: access denied using mkdir and rmdir in jenkins
body: <p>Jenkins is generating a build of a C++ project made in Visual Studio.</p>
  
  <p>During the process, some <code>.bat</code>s are called and in one of them, there is a structure like this:</p>
  
  <pre><code>SET TEMPDIR=Temp
  rmdir %TEMPDIR% /S /Q
  echo Don't continue if there was an error above (except the not found error which is ok) and go hand delete the dir!
  :pause
  mkdir %TEMPDIR%
  </code></pre>
  
  <p>I'm not very familiar to batch scripting, but when both <code>rmdir</code> and <code>mkdir</code> are called, Jenkins gives me <code>access denied</code>.</p>
  
  <p>I looked in the build configurations to search for any type of read/write permissions but it seems there isn't any.</p>
  
  <p>How can I fix this? Later the other scripts try to access <code>Temp</code> but they fail and it breaks my build.</p>