cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: how to change to higher dir?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 18 May 2005 15:48:18 +0200 (CEST)

On Wed, 18 May 2005, Barry Ringuet wrote:

> hi, using curl 7.8, trying this:

7.8? That is very soon 4 years old...

> have confirmed that somedir can be cd'd to, interactively, but have to do
> cd /somedir after logging in...
>
> this is kinda what I want to do:
> curl -O -v -u someuser:somepass
> ftp://some.ftpserver.com/../somedir/somefile
> but, obviously, can't...

Why can't you?

... or why not use an extra slash before the first dir:

  ftp://some.ftpserver.com//somedir/somefile

The RFC-way of specifying a URL that changes to the root dir looks like this:

  ftp://some.ftpserver.com/%2fsomedir/somefile

... which also is supported by (recent) curl.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-05-18