well if you are using visual C++ then this is the function you want
long _findfirst( char *filespec, struct _finddata_t *fileinfo );
Provides information about the first instance of a filename that matches the file specified in the filespec argument.
for the filespec parameter you can pass it "*.*" to find files. Read up on microcraps documentaion on it and you will figure it all out.
also as a side note......you will have to set up a loop kinda like this...
Code:
long FileHandle = 0;
_finddata_t FileData; //Structure to stores file data.
/* Not sure what is in FileData right now. all I know is that it
doesn't contain the data I want. */
FileHandle = _findfirst("*.*",&FileData);
if(FileHandle != -1)
{
int Result = 0,
FileCount = 0;
/* Same with this one.
Result = _findnext(FileHandle,&FileData);
/* This Filedata has the first file in the Directory now.
Result = _findnext(FileHandle,&FileData);
while(Result == 0)
{
/* Do other stuff*/
/* Get next file. If no more files, result == -1 */
Result = _findnext(FileHandle,&FileData);
}
}
Hope this helps ya somewhat. If all else fails check mocrocraps help documents or borlands depending on your compiler.