Hi,

I would first make a function to send a single file over your TCP-IP link.
For the data transfer : first you would send the file name with full path, the length of the file, and then the file itself.

Then you can use Davids recursive function to find all files, and send each one-by-one by calling this function.

On the receiving end, you parse the file name and create the directory if necessary. Then write the file as you receive it. Of course you should also add some checks to see if the file was completely and correctly received.

Regards,
Marc