Get a filtered list of files in a directory
import glob jpgFilenamesList = glob.glob(‘145592*.jpg’) See glob in python documenttion
import glob jpgFilenamesList = glob.glob(‘145592*.jpg’) See glob in python documenttion
You can use the fs.readdir or fs.readdirSync methods. fs is included in Node.js core, so there’s no need to install anything. fs.readdir const testFolder=”./tests/”; const fs = require(‘fs’); fs.readdir(testFolder, (err, files) => { files.forEach(file => { console.log(file); }); }); fs.readdirSync const testFolder=”./tests/”; const fs = require(‘fs’); fs.readdirSync(testFolder).forEach(file => { console.log(file); }); The difference between the … Read more