Answer the question
In order to leave comments, you need to log in
Checking a directory for content, how?
Good afternoon.
I'm sitting dumb, I tried a bunch of combinations.
There is a folder, files are periodically added to this folder along the crown.
How to check this folder and pull out files of 0 (zero size)?
Answer the question
In order to leave comments, you need to log in
Variant on Node.js :
var fs = require('fs');
var filenames = fs.readdirSync('.');
var i, stats;
for (i = 0; i < filenames.length; i++) {
stats = fs.statSync(filenames[i]);
if (stats.isFile() && stats.size === 0) console.log(filenames[i]);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question