List all files and Folders in a Directory Tree in Google Drive with Apps Script

preview_player
Показать описание
Extracting files and folders from a Google Drive can be a notoriously slow process. In this tutorial, we are going to make a, dare I say, BLAZINGLY FAST (well for Google Drive) directory tree iterator for any of your selected folders and store our results in a Google Sheet for later use.

We won't be using the DriveApp Google Apps Script class here but rather dive into the Drive API v2 Advance Service.

Join me in this follow-along how-to tutorial with a Starter Google Sheet that you can find in the written portion of this tutorial below:

02:24 Get all items from a folder
12:03 Query multiple folders at once
23:30 Update folders and spreadsheet arrays
41:23 Build Drive API iterator.
53:43 next page token handling
01:02:50 Ensuring max query string length

** My Site **

** More on Google Apps Script **

** Products **

* Courses *

* Google Workspace Tools *

* Google Workspace Add-ons *

#googleworkspace #googleappsscript #googledrive #googlesheets #mp4 #videoediting #admin #businessadministration @googleworkspacedevs ​
Рекомендации по теме
Комментарии
Автор

Very nice, thank you! So many interesting tidbits in there beyond the actual folder content retrieval.

ardtmuir
Автор

IT WORKED. this is wonderful!! thank you so much!!

lucy
Автор

Good (and Great) Job!!! Thanks so much

fqyyvhj
Автор

Can you also do a separate video for shared drive? That would also be very helpful. Thank you 😭😭

jessicapaulo
Автор

Thanks so much for this. It sorta works. This is on a shared drive I need it for...I have Manager access to it. It gets the main folder easily, and then digs down into a few folders to grab a subfolder here and there, but it's missing a ton of subfolders and those files. I ended up paying for the code as this was to be a fairly quick turnaround time. Any thoughts?

joshua_pasafarming
Автор

I am using your script for
List all files and Folders in a Directory Tree in Google Drive with Apps Script
I was wanting to know is there a way to get the project script file associated with my file list
and can you get the last modified for them with this format date mm/dd/yyyy
and want to say thank you for your work it is great

ewfptic
Автор

Wow, , very detailed process, , do you have maybe the code or sell it or something I am not code saavy and I would like to list all my files and folders just like you did...

GabrielCollignon
Автор

I keep getting Drive is not defined error.

LostOrStolen
Автор

why we have to insert every folder id from drive?...is there a way that main folder directs to sub folder automatically...btw this video is informative by far.

nipunjain
Автор

my problem: TypeError: folders.forEach is not a function - the code in the line: folders.forEach((folder, idx) => {

VaHuPeJu_Mesei