title: Dos Command if exist does not work properly
body: <p>i know its not god to ask ms dos related questions now. but i have a small problem 
  i am creating a installer project to a application form that application i need to execute a create database script with a specified path. sql engine returns a error message when the path is not exist therefore i need to check the path is exist if not i need to create the path 
  to do that im using the below script for testing but it does not work as i expect. when i execute the same bat file for the second time it gives me below error </p>
  
  <p>"a sub directory or a file \installations\database already exists" </p>
  
  <p>hear is my code </p>
  
  <pre><code>c:
  IF NOT EXIST c:\installations\database GOTO NODIR
  cd C:\installations\database
  :NODIR 
  mkdir \installations\database\
  </code></pre>
  
  <p>Please help me to resolve this. if i can get an solution from sql it self that will be my answer cz personally i do not prefer dos batches :) </p>
  
  <p>thanks in advance. </p>