const fs = require('fs') const dir = '/Users/flavio/folder' const files = fs.readdirSync(dir) for (const file of files) { console.log(file) }