title: permission error when trying to use os.remove
body: <p>I have some code that if a certain folder exists, I want to remove it, and if the folder does not exist, I want to create that folder.</p>
  
  <p>Below is my code:</p>
  
  <pre><code>import os
  def build_file_structure(): 
      if os.path.exists('new data'):
          os.remove('new data')
      else: 
          os.mkdir('new data')
      source_dir = ''
      dst = 'new data'
      return source_dir, dst 
  
  if __name__ == "__main__": 
      source_dir, dst = build_file_structure()
  </code></pre>
  
  <p>The code works fine when there is no folder "newdata", but when the "newdata" folder exists prior to running I receive this error:</p>
  
  <pre><code>os.remove('new data')
  PermissionError: [WinError 5] Access is denied: 'new data'
  </code></pre>