var mm = require('micromatch'); //var str = mm.makeRe(['*.js','*.dot']); //console.log('_str ',mm); var glob = require("glob"); //glob.option('cwd', '/'); var options = { //cwd:"/PMaster" cwd:"/home/mc007/Music/Sasha/" }; // options is optional //"*.sql|*.txt|!(*.*) glob("/home/mc007/Music/Sasha/+(*.mp3|*.wav|*.m4a)", options, function (er, files) { //console.log('error ',er); console.log('c: ',files); // files is an array of filenames. // If the `nonull` option is set, and nothing // was found, then files is ["**/*.js"] // er is an error object or null. });