List the Files in a Google Drive Folder
I’ve been on a coding binge 🙂 I saw that an AP Biology group were sharing lesson plans and resources in a Google Drive folder with a lot of subfolders to organize by topics. I thought it might be helpful to share the folder with a table of contents so I coded a way to grab each file in the folder(s) and list them.
- In a new tab go to alicekeeler.com/listthefiles
- Choose to copy the file.
- Wait about 1 minute for the code to load.
- Use the Add-on menu to choose “List the Files”
- You will need to authorize the code by clicking on “Advanced” and “Unsafe.” (It’s safe, I personally coded it.) You are only authorizing YOURSELF access to your files and Drive. You copied the code so now you are the owner of the code.
- Click the button to choose a folder in your Google Drive.
- You are selecting the FOLDER so single click on the folder and select.
- You may need to refresh, it can take a few minutes depending on how many files are being listed to fully generate the list.
- Format the resulting spreadsheet as desired.
If you do not have subfolders in your Google Drive folder you will end up with a list of all the files in the selected folder. Format this into a useable table of contents. Reorder the files and add comments as desired. If you have subfolders in the parent folder each of those sub folders will be represented in it’s own tab.
(note: the code only goes one layer deep of folders. If you have folders in the folders those were not picked up)
Format the Sheets
The alicekeeler.com/listthefiles just gives you a list of the files with the link to the file in the spreadsheet. You can now format the spreadsheet as desired to make it a useable table of contents. I have added checkboxes next to each file… mostly because I have a love affair with spreadsheet checkboxes. You can remove the checkboxes and perhaps number the files in the order you would like them to be accessed for your table of contents. Make columns wider, set word wrap, add a column for comments. Do whatever you want! It is your spreadsheet and editing the spreadsheet does not affect the files in Drive at all.
Try a Macro
If you have a lot of subfolders then you would probably want to format each subfolder tab the same way. Use the Tools menu in Google Sheets to use a Macro to record the steps of you formatting one page of the spreadsheet. Go back to the Tools menu to access your saved Macro to apply it to all of the other sheets in the spreadsheet.
Save the Spreadsheet in the Drive Folder
If you set up the spreadsheet as a table of contents guide to the folder you may want to rename the spreadsheet to “00 TABLE OF CONTENTS” and add it to the folder. This way when anyone accesses the folder they will alphabetically (hence the 00) see the table of contents first!
The spreadsheet does NOT automatically update. You would need to create a brand new alicekeeler.com/listthefiles if additional files are added. You could delete most of the tabs in the spreadsheet and run the add-on again to update the same spreadsheet. This would also allow you to use your Macro to format the update quickly.
Share the Spreadsheet
If the purpose of your Google Drive folder is to share resources then you may want to consider sharing the spreadsheet instead of the folder link. This way you can add a sheet with some directions or notes on how the shared folder works and the spreadsheet acts as a more organized way of accessing the files.