curl-users
Re: how to FTP upload a whole directory?
Date: Thu, 31 Dec 2009 00:33:15 +0100
Hello Kamil,
thanks for your prompt answer.
I know that I can do it by invoking curl many times, but is there a way to do it in one shot?
In your solution curl will be reconnecting after transferring each file which can be a drawback if lots of small files need to be transferred.
Jarek
Dnia 31 grudnia 2009 0:13 Kamil Dudka <kdudka_at_redhat.com> napisaĆ(a):
> On Wednesday 30 of December 2009 23:51:44 jar123 wrote:
> > How can I upload a whole directory?
>
> I guess you need to invoke curl more times:
>
> for i in *.dll; do
> curl -v -P- -u xxx:xxx ftp://xxx.xxx.xxx.xxx/ -T $i
> done
>
> > When I type this command:
> > curl -v -P- -u xxx:xxx ftp://xxx.xxx.xxx.xxx/ -T *.dll
> > I receive the following output:
>
> The string *.dll is expanded by shell in this case. Only the first file
> is taken as uploaded file and the rest is taken as extra URLs.
>
> Kamil
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-31