cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Suggestion: create paths upon ftp uploading

From: Daniel Stenberg <Daniel.Stenberg_at_haxx.nu>
Date: Fri, 19 May 2000 16:41:28 +0200 (MET DST)

On Fri, 19 May 2000, Uwe Keim wrote:

> when using curl to upload files, it should be possible to let curl create
> pathes that are not present. e.g.:
>
> curl -T uploadfile -u user:passwd
> ftp://ftp.upload.com/mydir/mysubdir/mysubdir/myfile
>
> should create the subdirs, if the not exists.

I wouldn't like that as a default option. I could consider an option to
enable it. Now, there's hardly any sing-letters left so I guess that would
force me to make that opion full-name only. I'll have to give this some more
thoughts first. Anyone else have any comment on this?

Just for the record, you already can get curl to make the dir first by using
-Q and enter the commands "manually".

> In addition, batch-uploading of whole directories would be very handy.
> e.g.
>
> curl -T uploaddir -u user:passwd
> ftp://ftp.upload.com/mydir/mysubdir/mysubdir

When I created libcurl once upon the time, and even more so now when I'm
redesigning libcurl, I thought we would see more utilities based on libcurl
that could feature more specialized stuff, rather than stuff every imaginable
feature into curl.

Copying an entire directory with curl like this is not what I plan to add. I
might very well add a way to upload several files during one connection, but
then I think you'll have to specify all the files you want to transfer. Doing
that, you can upload much more than just a dir in case you want, and you can
do things much more flexible. (you could even very quickly write a
wrapper-script to curl that uses exactly the interface you suggest)

You know you can use your standard ftp client to do most of that stuff as
well?

-- 
   Daniel Stenberg - http://www.contactor.se/~dast - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-05-19