cURL / Mailing Lists / curl-library / Single Mail

curl-library

Capture the result of FTP command

From: Sundar, Karthik <Karthik.Sundar_at_nielsen.com>
Date: Thu, 6 Nov 2008 17:17:33 +1100

 

Hi ppl,

 

I am using Curl to retrieve the file size from a remote machine. I am
using the command SIZE as below....bd is the filename

 

            

                         sprintf(buf_1, "SIZE bd");

 

                         headerlist = curl_slist_append(headerlist,
buf_1);

 

                         curl_easy_setopt(curl, CURLOPT_QUOTE,
headerlist);

 

                         res2 = curl_easy_perform(curl);

 

I am getting the output printed as

> SIZE bd

< 213 1501184

 

Please let me know how to get the size "1501184" in a variable.

 

 

Thanks in Advance

Karthik S

 
Received on 2008-11-06