views:

87

answers:

3

I want to synchronize the contents of two folders using C. I don't have any line of code, I simple want someone to suggest a good tutorial to start with.

A: 

You need to learn about dirent.h and stat. Googling for those I found this link.

Doug Currie
+2  A: 

First of all, there is no 'C' way to do this. You will need to use platform-dependent filesystem functions. What OS are you running?

On Linux systems, try opendir and friends (from dirent.h).

On Windows systems, try this listing of Win32 File Management functions.

bta
A: 

I suggest not writing code, but using Sync Butler.

Otherwise you may want to search the Boost library for any platform independent methods for accessing folders (since you didn't tell us which OS or platform you are using).

Thomas Matthews