cURL / Mailing Lists / curl-library / Single Mail


Capture the result of FTP command

From: Sundar, Karthik <>
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 is the filename



                         sprintf(buf_1, "SIZE bd");


                         headerlist = curl_slist_append(headerlist,


                         curl_easy_setopt(curl, CURLOPT_QUOTE,


                         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