Created
October 21, 2015 12:10
-
-
Save seafoam6/e0a0b95cd727e1778e3d 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 path ='/Volumes/FORGETMENOW'; | |
var fs = require('fs'); | |
fs.readdir(path, function(err, files){ | |
var rando = Math.floor(Math.random() * files.length); | |
console.log(files[rando]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment