void findFile() { WIN32_FIND_DATA fileinfo = {0}; CString strFilePath = "C://Documents and Settings//wuchen//Favorites//"; HANDLE handle = FindFirstFile( strFilePath + "*.*", &fileinfo ); //C:/Documents and Settings/wuchen/Favorites/ if (NULL != handle && INVALID_HANDLE_VALUE != handle) { do { CString strTmp = fileinfo.cFileName; HINSTANCE myH = ShellExecute(NULL, "open", strFilePath+strTmp, NULL,NULL, SW_HIDE); AfxMessageBox(strTmp); } while (FindNextFile( handle, &fileinfo )); FindClose(handle); } return; }