title: os.mkdir error- system cannot find the specified path
body: <p>I am trying to create new folders using dictionary keys. The code is:</p>
  
  <pre><code>os.mkdir("Y:\\Bleeding-study\\MIMIC\\Notes\\randombins\\")
  
  for key in index:
      os.mkdir("Y:\\Bleeding-study\\MIMIC\\Notes\\randombins\\batch_%s\\"%str(key))
      os.mkdir("Y:\\Bleeding-study\\MIMIC\\Notes\\randombins\\batch_%s\\%s\\"%(str(key),"config"))
      os.mkdir("Y:\\Bleeding-study\\MIMIC\\Notes\\randombins\\batch_%s\\corpus\\"%str(key))
  </code></pre>
  
  <p>The error is:<br>
  <code>WindowsError: [Error 3] The system cannot find the path specified: 'Y:\\Bleeding-study\\MIMIC\\Notes\\randombins\\batch_0\\'</code></p>
  
  <p>I thought this code would create that file pathname, so why is it giving this error?</p>