Skip to content

Instantly share code, notes, and snippets.

@mshock mshock/
Last active Aug 29, 2015

What would you like to do?
backup and delete original files by size in target directory - cleanup reddit wallpaper stash populated by IFTTT
function wallpaper_cleanup() {
var folder = DriveApp.getFoldersByName("wallpapers").next();
var small_folder = DriveApp.getFoldersByName("small_wallpapers").next();
var files = folder.getFiles();
while (files.hasNext()) {
var file =;
if (file.getSize() < 200000) {
Logger.log(file.getName() + file.getSize());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.