> Hi Sam,
>
> When you use "*.*", you will always match the current directory (".")
> and the parent directory (".."). You will need to loop using
> FindNextFile and eliminate those two directories. You may also want
> to check the attributes of the entry you matched and eliminate ALL
> directory entries.
>
> e.g. if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {}
> ~Rick
>
Ah yes i see why it wasnt working now thanks.
WIN32_FIND_DATA FindFileData;
HANDLE handle =
FindFirstFile("c:\\FinalBVHPLAYER\\Recordings\\*.bvh",&FindFileData);
string filename ;
do{
filename = FindFileData.cFileName;
listBoxPlayer->addItem(new MyListItem(filename));
}while(FindNextFile(handle,&FindFileData));
FindClose(handle);
thanks all again for the help
g