I made this for myself, but you can all have it too.
void downloadFTPFiles(char *directory, char *localDir, char *ftpServer, char *ftpUser, char *ftpPass)
{
if (!dbPathExist(localDir))
dbMakeDirectory(localDir);
dbFTPConnect(ftpServer, ftpUser, ftpPass);
char *startDir = dbGetFTPDir();
char *LstartDir = dbGetDir();
dbFTPSetDir(directory);
dbSetDir(localDir);
dbFTPFindFirst();
while ( dbGetFileType() > -1 )
{
dbFTPGetFile(dbGetFTPFileName(), dbGetFTPFileName());
dbFTPFindNext();
}
dbFTPSetDir(startDir);
dbSetDir(LstartDir);
dbFTPDisconnect();
}
Usage:
downloadFTPFiles("sampledirectoryonFTP", "sampledirectoryonyourcomputer", "ftp://thisisasample.com", "sampleuser", "samplepass");
Credit to dark coder for the bare essentials.