cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl-library

From: Koka Leela Siva Kumar <sivaleelak_at_gmail.com>
Date: Wed, 20 Aug 2014 14:27:29 +0530

Hi ,

I want to get the list of files from the remote ftp server.

can you please help me regarding this.

my snippet code.

  FILE *hd_src;
  struct stat file_info;
  curl_off_t fsize;

   string post_cmd_delete;
   string remote_url;
   struct curl_slist *list = NULL;

   hd_src = fopen ("data1.txt", "w");
   curl_easy_setopt (m_curl_handle,CURLOPT_URL, "
ftp://10.xx.xxx.xx/~/cdrtest");
   curl_easy_setopt (m_curl_handle, CURLOPT_USERPWD,"root:123s");
   post_cmd_delete = "ls *cscf1* | sort | tail -2";
   list = curl_slist_append(list, post_cmd_delete.c_str());
   curl_easy_setopt(m_curl_handle, CURLOPT_QUOTE, list);

    curl_easy_setopt (m_curl_handle, CURLOPT_WRITEDATA, hd_src);
     CURLcode result = curl_easy_perform(m_curl_handle);

thanks and reagrds
koka

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-20