Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve the titles of a folder's children in Google Drive?

It appears that listing the children of a folder doesn't actually return the titles of said children according to the Google Drive documentation.

Do I have to query using the id of every single child to determine the name of the file/folder?

Thanks!

EDIT:

Just occurred to me, is the way around this to do a search where the parent id is equal to the folder id I want to see the contents of?

like image 687
Stuart Memo Avatar asked Aug 05 '12 20:08

Stuart Memo


People also ask

How do I get a list of files in a Google Drive folder?

Goto the same Google Sheets File and refresh the page. Then you will get the "List Files/Folders" menu, click on it, and select the "List All Files and Folders" item.

How do I copy file names from Google Drive?

On your computer, go to drive.google.com. Select a file. Select an option: To copy the file or folder name to the clipboard as a link, press Ctrl + c.


1 Answers

You are absolutely correct, listing the children of a folder only gives you their ids, so you have to send other queries to retrieve titles and the other metadata. I agree this is not optimal and we are considering making some changes here to improve the developer experience.

In the meanwhile, I'd recommend adopting your workaround and search for those files whose parent is the folder you want to see the contents of.

like image 103
Claudio Cherubino Avatar answered Oct 01 '22 14:10

Claudio Cherubino