An Apps Script that finds all files/folders on Google Drive that are shared with others and adds them to a Google Sheet.
An Apps Script that finds all files/folders on Google Drive that are shared with others and adds them to a Google Sheet.
![]() |
---|
Screenshot of output spreadsheet |
- Create a new Google Sheet
- Open the Script Editor (Extensions > Apps Script)
- Copy and paste the code from shared-file-finder.js into the Script Editor
- Enable
Drive API
in theAdvanced Services
list for the project (see here for instructions). The API version should be v2 and the identifier should beDrive
- Save the project and run the
runSharedFileFinder()
function
Notes:
- Files must be owned by the current Google Drive user
- If a folder is shared, both the folder and its files will be shown in the list
- There may be bugs. Use at your own risk
Contributions, issues, and forks are welcome.
Inspired by similar scripts by @danjargold and @woodwardtw (linked below). This version uses the Drive API v2 to get info for multiple files at once which makes it substantially faster.
This project is licensed under the MIT License. See LICENSE for details.
- tellmeyoursecrets.js: An Apps script by @woodwardtw that lists info about the files in a particular folder/sub folder structure including viewers, editors, and sharing permissions. Note that this script does not find files recursively (ie. it shows a list of the shared items inside the specified folder and its subfolders, but not items contained in nested subfolders)
- whatFilesHaveIShared.gs: An improved fork of the above script by @danjargold that finds files recursively
- Tally: Your favorite word counter, now with a dark mode! Count the number of characters, words, sentences, paragraphs, and lines in your text instantly
- Mergist: Mergist is an online tool to combine multiple PDF files into one. Mergist has no ads, no file size limits, and your files never leave your device
Find this project useful? Sponsoring me will help me cover costs and commit more time to open-source.
If you can't donate but still want to contribute, don't worry. There are many other ways to help out, like:
- 📢 reporting (submitting feature requests & bug reports)
- 👨💻 coding (implementing features & fixing bugs)
- 📝 writing (documenting & translating)
- 💬 spreading the word
- ⭐ starring the project
I appreciate the support!