Created
November 26, 2017 00:42
-
-
Save glennblock/fc032b9c65abe5f969fddf71359601e2 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
var fs = require('fs'), _ = require('underscore'); | |
var source = './Dropbox/Camera Uploads/'; | |
var dest = './picframe/'; | |
var size = 1000; | |
var files = fs.readdirSync(source); | |
var sample = _.sample(files, size); | |
for(i=0;i<size;i++) { | |
console.log("Copying file: " + (i+1)); | |
fs.copyFileSync(source + sample[i], dest + sample[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment