Now i have that problem :
I want to search in a given path and not in the same folder where there is the program i've created..
The code is :
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
int cmd3 = 192512;
int cmd8 = 188416;
int graf = 413696;
WIN32_FIND_DATA FindFileData;
HANDLE hFind = FindFirstFile("*.exe", &FindFileData);
if (hFind != INVALID_HANDLE_VALUE) {
do {
printf ("I've found: %s\n", FindFileData.cFileName);
printf ("The size is %d\n", FindFileData.nFileSizeLow);
if ((FindFileData.nFileSizeLow == cmd3)
|| (FindFileData.nFileSizeLow == cmd8)
|| (FindFileData.nFileSizeLow == graf))
printf ("Found! %s\n\n", FindFileData.cFileName);
else printf ("Not matching\n\n");
} while (FindNextFile(hFind, &FindFileData));
FindClose(hFind);
system("pause");
return 0;
}
}
And I want to look for that *.exe files in a given path(that will change in a for cicle, but this is not a problem), what I have to do ? I will have a path in a string like "strStartPath" and i want to search here.
Thanx