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.
List Google Drive Files
This unofficial Add-on by Alice Keeler collects NO user information. I have zero access to any of your files. When you authorize the Add-on you are only authorizing yourself to have access to your own files.
Make a table of contents for a folder in Google Drive. Make it easier to organize and make notes about what is in your folder. Use this for your own use or when you are sharing with friends and colleagues.
- First, in a new tab go to alicekeeler.com/listthefiles
- Then choose to copy the file.
- Then you will need to wait about 1 minute for the code to load.
- Use the Add-on menu to choose “List the Files”
- 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.
Google Drive Table of Contents
A table of contents in Google Drive will let you list your Google Drive files. Very helpful and handy. It does not automatically update when you add new files to the folder so you will need to re-run the Add-on.
11 thoughts on “Google Drive: Create a Table of Contents for a Folder”
This is an amazing add on! Will it add files to my list in the spreadsheet if I run the add on again?
No, in fact it will cause a conflict since it will try to make tabs with the same name.
I’m not seeing subfolders. I have several ‘nested’ folders.
I could not get it to load. It kept asking for permission for the script, which I kept hitting allow! It would take me back to the same place. It says A script attached to this document needs your permission to run.
Continue. I hit continue and advanced, and allow and it brings me back to this
You are having an account conflict. You’re allowing it on a different account than you’re running it. Alicekeeler.com/conflict
This was working wonderfully for me, and now all of a sudden the List the File step just doesn’t load at all, no matter how long I wait, how many times I refresh, and regardless of which browser I use.
Any tips on fixing this?
Sorry Chantelle, I have no guesses as to why it is not working. I have not done anything to the code.
OMG! Thank you. You are a life saver!
How can we traverse into a few subfolders?
You would want to run it on each sub folder and then copy paste into the same spreadsheet list.
You must log in to post a comment.