Created
September 20, 2018 07:42
-
-
Save nico-abram/ec510fac76109820ee24ae3a93686a22 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 countFilesInFolder() { | |
var c=1; | |
var size = 0; | |
var folderName = "Packs3"; | |
var folders = DriveApp.searchFolders('sharedWithMe and title contains "'+folderName+'"'); | |
var folder = folders.next().getFiles(); | |
while (folder.hasNext()){ | |
var file = folder.next(); | |
c+=1; | |
size +=file.getSize(); | |
} | |
Logger.log(c); | |
Logger.log(size); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment