iterative / PyDrive2

Google Drive API Python wrapper library. Maintained fork of PyDrive.
https://docs.iterative.ai/PyDrive2
Other
581 stars 69 forks source link

Question - How to move Drive folder to another location #181

Closed jonathanelscpt closed 2 years ago

jonathanelscpt commented 2 years ago

How do I move a google drive folder to another location?

Say I have f1 with id='xxxxxx'. I would like to move it from its existing location, and make is a subfolder of f2 with id='yyyyyy'

it appears that the underlying API call is here (drive v3 API): https://developers.google.com/drive/api/guides/folder#move_files_between_folders

If relevant to the API call, assume that this is on a google shared drive. I can't see how to do this in the documentation. I assume its something to do with changing file metadata to define a new parent.

Can anyone guide me in the right direction?

jonathanelscpt commented 2 years ago

note that this is to move files between folders. i assume that its the same API call to move folders between folders

jonathanelscpt commented 2 years ago

Can close. Managed to do this natively with the underlying v3 python client.