简体   繁体   中英

My google sheets file have no source folder , I've to move it into drive folder using python

My Google file is not placed in drive folder but it is placed in simple google sheets location. I want to move it into drive folder using python but the "code" needs source_folder_id="" .

But I don't have any source_folder_id because its not placed in folder. The place where my GSheet file is placed

Any help how to move it from here, using google sheets API and python ? thanks

Since your file is placed in your main Google Drive folder, you have two options:

  1. You could create a folder in your Drive, place the file in there, and reference that ID.
  2. As per the Drive API , you can use root to refer to the root folder anywhere a file ID is provided.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM