Hi, I need some help getting started using C to work with directories, and some files within them.

Firstly, I need to change the path to a particular directory.

This directories has about 10 directories, each with about 10-20 files that I need to process with a separate batch file.

If the process fails, I need those files to be put into a 'Bad Process' directory so I know which files need to be fixed.

So, I want to start with the first directory, find the first file, run the batch file that manipulates that file, then continue on to the next file.

Once it has processed each file in the first directory, I need it to move on to the next directory and repeat the process until all directories have been worked through.


The guys on the C board told me that there are functions readdir() opendir() and such that work nicely if you're using *NIX. But, for windows, what are the equivalent functions?

Thanks,
Brian