I tried to use this function:
function getCount(foldername)
{
var myObject, f, filesCount;
myObject = new ActiveXObject("Scripting.FileSystemObject");
f = myObject.GetFolder(foldername);
filesCount = f.files.Count;
document.write("The number of files in this folder is: " + filesCount);
}
However, I get the error: Uncaught ReferenceError: ActiveXObject is not defined
Does anyone know an effective way to get the total number of image files in a folder with Javascript/Jquery
? To facilitate, it may be the count of everything in the folder, as there is no possibility of there being another type of non-image file.