Don't know anything of the unix/solaris box. If you can use win32api there's a bunch of sample code to use wininet functions like InternetConnect, InternetOpen, FtpGetFile, FtpPutFile. You can loop files on an ftp server using hFind=FtpFindFirst and hFind=InternetFindNextFile (only for one hFind at the same time). If you want to loop recursively you can first loop the ftp root, create the found directories in a local tempfolder and loop them while requesting it from the ftp sever.

But keep in mind, wininet does not support ftps or sftp, so only ftp is possible. In my own situation I wanted a secure connection for backup files and decided to use wininet for https upload.