Skip to content

Instantly share code, notes, and snippets.

@greemwahr
Created February 27, 2016 03:31
Show Gist options
  • Save greemwahr/e7f8e28ddff39d84ec57 to your computer and use it in GitHub Desktop.
Save greemwahr/e7f8e28ddff39d84ec57 to your computer and use it in GitHub Desktop.
var fs = require('fs')
var path = require('path')
fs.readdir(process.argv[2], function (err, list) {
list.forEach(function (file) {
if (path.extname(file) === '.' + process.argv[3])
console.log(file)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment