| CODE |
HANDLE hFind; WIN32_FIND_DATA oFind; hFind = FindFirstFile("yourdirpath\*.*", &oFind); if(hFind != INVALID_HANDLE_VALE) { do { // you can get filename and attributes of files using the oFind object // e.g. filename would be oFind.cFilename // so here you can do whatever you need to do with them }while(FindNextFile(hFind, &oFind)); } |
| CODE |
WIN32_FIND_DATA wfd; HANDLE s = FindFirstFile(argc[0], &wfd); if(s == INVALID_HANDLE_VALUE) { cout << "DIDNT WORK!"; return 0x01; } else { cout << "DID WORK!!"; return 0x02; } FineClose(s); |