I am using the Windows API and would like to be able to search through a specified directory and return the names of any files that reside within it.
I've made a start at it however i've hit a brick wall as i'm unsure of how to go any further.
Here is my progress so far:
#include <stdio.h>
#include <windows.h>
void main()
{
HANDLE fileHandle;
WIN32_FIND_DATAA fileData;
fileHandle = FindFirstFileA("*.txt", &fileData);
if(fileHandle != INVALID_HANDLE_VALUE)
{
printf("%s \n", fileData.cFileName);
}
}