title: automatic upload on dropbox from raspberry pi?
body: <p>I am using  "Dropbox-Uploader" script from github on my raspberry pi to upload videos on my dropbox account.</p>
  
  <p><a href="https://github.com/andreafabrizi/Dropbox-Uploader" rel="nofollow">https://github.com/andreafabrizi/Dropbox-Uploader</a></p>
  
  <p>its working great but now i want my raspberry pi to upload videos automatically on dropbox . for this i wrote python script</p>
  
  <pre><code>import os
  path="/tmp/motion/"
  
  def upload_files():
      if not os.path.exists(path):
          return
      os.stdir(path)
      for files in os.listdir("."):
          if files.endswith(".avi"):
              cmd = "/home/pi/dropbox_uploader.sh upload " + path + files
              os.system(cmd)
              os.system("sudo rm /tmp/motion/" + files)
  
  
  if _name_ == "_main_":
      upload_files()
  </code></pre>
  
  <p>and set it as cronjob but its not working it is not uploading anything on my account. any help would be appreciated</p>