#include <stdio.h>
#include <dirent.h>
int main(int argc, char **argv)
{
DIR *dir;
struct dirent *file;
if ( (dir = opendir("c:\\xampp\\htdocs\\allonpage.com")) == NULL) {
puts("Error read directory");
return 1;
}
int counter = 0;
while ((file = readdir(dir)) != NULL) {
counter++;
}
closedir(dir);
printf("%d\n", counter);
return 0;
}
/*
run:
132
*/