Created
August 15, 2021 17:52
-
-
Save abdiasriver/03e5fa2d210b88d7bb3441ea10cd2e81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showpermisssions() { | |
var folder = DriveApp.getFolderById("IDCARPETA"); | |
var files = folder.getFiles(); | |
while (files.hasNext()) { | |
// Print list of files inside the folder | |
file = files.next().getId(); | |
var id = DriveApp.getFileById(file); | |
try { | |
// var folacc = folid.getSharingAccess(); | |
// var folperm = folid.getSharingPermission(); | |
var access = id.getSharingAccess(); | |
var permission = id.getSharingPermission(); | |
var viewers = file.getViewers(); | |
var editors = file.getEditors(); | |
// Logger.log(id); | |
} | |
catch (e) {Logger.log(id); Logger.log(access);Logger.log(permission);}; | |
// Recursive call for any sub-folders | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment