cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp send and rename example fails for me

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Feb 2003 06:43:01 +0100 (CET)

On Mon, 17 Feb 2003 aplumb_at_westpac.com.au wrote:

> Can someone tell me if there is something wrong with the example, or am I
> doing something wrong here ??

[source snipped out]

I believe that the cause of the problem is visible in your output trace:

> * About to connect() to 10.6.115.45:21
> * Connected to 10.6.115.45 ((nil)) port 21
> > USER andrew
> > PASS andrew
> * We have successfully logged in
> > PWD
> * Entry path is '/'
> > CWD temp

CWD is the FTP command to change current working directory. It changes dir to
'temp'.

> > EPSV
> > PASV
> * About to connect() to 10.6.115.45:4905
> * Connecting to 10.6.115.45 ((nil)) port 4905
> * Connected the data stream with PASV!
> > TYPE I
> > STOR newipfile.txt

And in 'temp' it uploads a file that you call 'newipfile.txt'.

> > RNFR temp/newipfile.txt

... but here you try to access the file prefixed with the directory name,
which of course is not correct at this point.

The RNFR and RNTO file names should be set to use file names without
directory, and I think it'll work just fine for you!

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-02-17