I am on windows platform. One solution that came in my mind is using "system" function in C to ask OS to do my request as can be seen below:
result = system("dir c:\\video > c:\\video\\dirlist.txt");
By parsing the content of txt file i can achieve my request. But C has other functions such as exec, fork and popen. I am looking for the most efficient one. I should do the following scenario:
1-pars the .txt file content and get the video file name.
2- run an exe file (a program that extract pictures from video) over the video file and send the resulted images in a directory.
3- process the images in the directory.
The above process should be in a loop and iterated for more that 1000 times. So the compiler should wait to finish each part of process and then continue next step.
I hope i have explained the problem well. Whats your advice?