Use my example... index *.csv ... parse the filenames as you need to... the WIN32_FIND_DATA (Click me, I'm a link!) struct gives you the file dates as well so you can easily get your timestamps directly from there. Now that you got your filename, and you've checked the timestamps ... Use a function to Open the candidate files and split out the needed data. ... then move on to the next file... and so on until the list completes. You don't need a list of files... that's slow grungy and stupid... grab one directory listing, do what you gotta do then move on to the next....
Again... no reservations... doing this the system() way is just plain silly.
Ok, how about this...
Code:BOOL DoDirectoryStuff(char *WildCards) { WIN32_FIND_DATA fd; HANDLE fh; fh = FindFirstFile(WildCards,&fd); if (fh == INVALID_HANDLE_VALUE) return FALSE; do { // insert several megabytes of code here. } while(FindNextFile(fh,&fd); FindClose(fh); return TRUE; }