title: Python: PermissionError: [Errno 13] Permission denied with pydrive?
body: <p>Here's my code for a very simple program:</p>
  <pre><code>import os, shutil
  from pydrive.auth import GoogleAuth
  from pydrive.drive import GoogleDrive
  
  source_path = r&quot;c:/users/x/appdata/roaming/medianxl/save&quot;
  destination_path = r&quot;c:/users/x/desktop/backup_saves&quot;
  
  print(&quot;Contents being backed up:&quot;)
  print(os.listdir(source_path))
  destination = shutil.copytree(source_path, destination_path)
  print(&quot;Contents successfully backed up to:&quot;, destination_path)
  
  print(&quot;Now uploading backup saves to Google Drive...&quot;)
  
  auth = GoogleAuth()
  auth.LocalWebserverAuth()
  drive = GoogleDrive(auth)
  
  saves = drive.CreateFile()
  saves.SetContentFile(r&quot;c:/users/x/desktop/backup_saves&quot;)
  saves.Upload()
  </code></pre>
  <p>So far I am having no issues when it comes to taking the folder from the appdata location and copying it to my desktop. Where I am getting the error in my title is when I go to upload that folder and its contents on my desktop to Google Drive using pydrive.</p>
  <p>Here's the output from the command window after running the program:</p>
  <pre><code>Contents being backed up:
  ['preferences.json', 'TSW', 'uhp_prettycolor.d2s', 'uhp_prettycolor.key', 'uhp_prettycolor.ma0', 'uhp_prettycolor.map']
  Contents successfully backed up to: c:/users/x/desktop/backup_saves
  Now uploading backup saves to Google Drive...
  Your browser has been opened to visit:
  
      url here
  
  Authentication successful.
  Traceback (most recent call last):
    File &quot;backup.py&quot;, line 21, in &lt;module&gt;
      saves.SetContentFile(r&quot;c:/users/x/desktop/backup_saves&quot;)
    File &quot;C:\Users\x\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pydrive\files.py&quot;, line 169, in SetContentFile
      self.content = open(filename, 'rb')
  PermissionError: [Errno 13] Permission denied: 'c:/users/x/desktop/backup_saves'
  </code></pre>
  <p>I've tried running cmd as admin but am still getting the same permissions error. Any ideas?</p>