Skip to content

Instantly share code, notes, and snippets.

@radjivF
Last active August 29, 2015 14:14
Show Gist options
  • Save radjivF/fff0173ffa0acd2f83f5 to your computer and use it in GitHub Desktop.
Save radjivF/fff0173ffa0acd2f83f5 to your computer and use it in GitHub Desktop.
Get the lists of files in a folder
var dirFolder= 'TODO/';
function getFileInFolder(dirFolder){
var fileList = fs.readdirSync(dirFolder);
console.log('list of files in the folder: '+ fileList)
console.log('we found '+ fileList.length +' files')
return fileList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment