cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Upload and rename

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Aug 2001 15:31:45 +0200 (MET DST)

On Tue, 28 Aug 2001, Erick Nuwendam wrote:

> Am I wrong with CURL calls?

They're basically correct:

> char buf_1 [] = "RENAME FROM toto.txt";
> char buf_2 [] = "RENAME TO erick.txt";

These ones are not valid FTP commands. I don't think you studied the RFC hard
enough! ;-)

They should look something like:

 "RNFR toto.txt"
 "RNTO erick.txt"

> curl_easy_setopt(curl, CURLOPT_UPLOAD) ;

You should add a TRUE argument too there. All curl_easy_setopt() function
calls take three arguments.

And an idea would be to add:

        curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);

... while debugging, to get a flow of information that'll help you understand
things.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-08-28