Hello,
is is possible to make a progam which search for *.exe or *.txt etc files on the hard drive.? And than save the results in a variable to start them.
I have also written a Code which search for the three *.exe files,
which has been copied to C:\ (Explorer.exe, Calc.exe, Mediaplay.exe). but the program doesnīt start the three programs.
thanks
JoJo
#include <stdio.h>
#include <dir.h>
#include <conio.h>
#include <process.h>
void main(void)
{
struct ffblk ffblk;
int done;
printf("Directory listing of *.exe\n");
done = findfirst("\\*.exe",&ffblk,0);
while (!done)
{
printf(" %s\n", ffblk.ff_name);
done = findnext(&ffblk);
spawnlp(P_WAIT, "\\*.exe", "\\*.exe");
}
getch();
}