![]() Print 'Uploading %s to %s' % (file_path, dest_path)ĭbx.files_upload(f, dest_path, mute=True) ![]() ![]() # walk return first the current folder that it walk, then tuples of dirs and files not "subdir, dirs, files"įor dir, dirs, files in os.walk(rootdir): Here is a working example: import dropbox, sys, os Meaning that f must be the content of the file (and not the filename string). path (str) – Path in the user’s Dropbox to save the file. ![]() From doc:įiles_upload(f, path, mode=WriteMode('add', None), autorename=False, client_modified=None, mute=False)Ĭreate a new file with the contents provided in the request. Your call to dbx.files_upload("afolder",'/bfolder/' + file, mute=True) says: "Send the text afolder and write it as a file named '/bfolder/' + file". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |