I took this code from FAQs.
And what I wanna to do now is that what is writing out execute.
In DIR patches I have lots of .exe patches.
And now what I wanna to do is some shellexecute or what.
Something like system("apps.exe");
So I wanna come into directory and execute all .exe files in it.
I do not have stranght any more. This is killing me!
Code:#include <dirent.h> #include <stdio.h> int main(void) { DIR *d; struct dirent *dir; /* char *path; */ d = opendir("."); /* d = opendir(path) */ if (d) { while ((dir = readdir(d)) != NULL) { printf("%s\n", dir->d_name); /* something like system(dir->d_name); but this not working for me */ } closedir(d); } return(0); }