Google Apps Script to unshare files and folders with someone.
- Unshare all files and folders with someone.
- Unshare a folder (incl. subfiles and subfolders) with someone.
- Go to https://script.google.com/start and make sure you're signed in with the Google Drive account you want to use for this.
- Copy & Paste the
unshareall.gs
in this repository into the default file and select themain
function under "Select function" - In the code, set the
userEmail
variable to the email address of the user you want unshare items with. - Hit run! (You will probably also be prompted grant permission to your drive so do that)
Inspired by https://github.com/HR/google-drive-unshare