title: To exist and copy or not to exist, make dir and copy
body: <p>I am trying to "deploy" word templates with this script:</p>
  
  <pre><code>if not exist "%USERPROFILE%\Documents\Custom Office Templates" (
  mkdir "%USERPROFILE%\Documents\Custom Office Templates" 2&gt;nul
  if not errorlevel 1 (
      xcopy /y /f /S "\\server\share" "%userprofile%\Documents\Custom Office Templates"
  )
  </code></pre>
  
  <p>But i hit a snag, some installations of Office makes the folder "Custom Office Templates" on its own. But my script in its current state only copys files if the folder does not exist. So i got curious.</p>
  
  <p><strong>Question:</strong> Is it possible to make the script copy files if the folder exist? 
  and if it doesn't exist my script proceeds with making the dir and copying files.</p>
  
  <p>I know there are many other ways to deploy these things, and some would maybe be easier, but i want to try with this method. Hope you can help.</p>
  
  <p>Thanks a bunch in advance.</p>