Skip to content

Instantly share code, notes, and snippets.

View ed-watts-87's full-sized avatar

Ed Watts ed-watts-87

  • Southampton UK
View GitHub Profile
@TimJMartin
TimJMartin / index.js
Created April 28, 2016 08:53
NodeJS Script for finding just zip files from a path
//Code snipped to use recursive-readdir to provide a list of required file types.
var path = require('path');
var recursive = require('recursive-readdir');
function ignoreFunc(file, stats) {
// `file` is the absolute path to the file and we can use extname to look at the file extension
return stats.isFile() && path.extname(file) != ".zip";
}
// Ignore files using the ignroeFunc