I have a folder path, for example /docs/word, and I would like to get the ID of the "word" folder (the last folder), in order to upload a file there. How do I get the ID?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
So I figured it out. What you have to do is get the id of the root
drive_service.about().get().execute()["rootFolderId"]
, and then get the files in root, go to the next folder in the path, etc. btw, the function i wrote to list the folders inside a path and save them to a dictionary (using self.addPath())