Javascript code to be used with Google scripts to index a Google folder and list all files contained within it in a Google Spreadsheet
To use this script follow the following steps:
-
Open a new Google spreadsheet
-
Click Tools > Script editor
-
In the Script editor window delete all existing code and paste all the code from the file "FindGDriveFilesRecursively.js"
-
Change the variable baseFolder to the name of the starting folder where the indexing should commence
-
Save the script and return to the Google Spreadsheet
-
Click Tools > Macros > Import
-
Select and import "ListNamedFilesandFoldersRecursively"
-
Click Tools > Macros > ListNamedFilesandFoldersRecursively
-
Watch the magic happen
NOTE: You will be asked to give permission to access your GDrive the first time you run the script, based on your browser settings, it may also warn you to return back to safety back just ignore it and (if you are using Chrome) scroll down click 'advanced' and then 'proceed'