Search code examples
c++downloadlibcurlftps

Downloading all files in directory using libcurl


I am new to the libcurl and found a way to download a single file from the ftp server. Now my requirement is to download all files in a directory and i guess it was not supported by libcurl. Kindly suggest on libcurl how to download all files in directory or is there any other library similar to libcurl?

Thanks in advance.


Solution

  • You need the list of files on the FTP server. Which isn't straightforward as each FTP server might return a different format of file listing...

    Anyway, the ftpgetresp.c example shows a way to do it, I think. FTP Custom CUSTOMREQUEST suggests another way.