In order to list the filenames from folder:FileName(BSTR path,BSTR* Retname, LONG* counter){ WIN32_FIND_DATA FindData; HANDLE FindHandle = FindFirstFile(path, &FindData); BSTR Filelist[1000]; int i=0; if (FindHandle != INVALID_HANDLE_VALUE) {