-
-
Save lwbuck01/c33dd68715671edf1961d586822bfcd0 to your computer and use it in GitHub Desktop.
I used this script to zip my files in a specific folder in google drive
This file contains hidden or 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 start () { | |
| var folder = DriveApp.getFoldersByName("First media design - November 21, 2015").next(), | |
| contents = folder.getFiles(), | |
| files = [], | |
| names = {}; | |
| while (contents.hasNext()) { | |
| var file = contents.next(); | |
| files.push(file); | |
| } | |
| folder.createFile(Utilities.zip(files.map(function(file) { | |
| var name = file.getName(); | |
| Logger.log(name + ": DONE"); | |
| return file.getBlob().setName(name) | |
| }), 'images.zip')); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment