cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: newb q about uploading a FOLDER to ftp

From: Samuel Fitz <sam_at_samfitz.com>
Date: Mon, 3 Nov 2008 14:39:37 -0700

thanks for clarifying. always appreciate the tips!

On Mon, Nov 3, 2008 at 12:43 PM, Dan Fandrich <dan_at_coneharvesters.com>wrote:

> On Mon, Nov 03, 2008 at 12:05:28PM -0700, Samuel Fitz wrote:
> > howdy gang,
> > i've just gotten into curl in the past few months and it has been a major
> time
> > saver in uploading one file to multiple sites. here is and example of the
> code
> > i have been using:
> > curl -T /Users/samfitz/vm/vertical-sites/VMcURL/images/site/file.php
> ftp://
> > gtrbnd:*******@www.allbendoregon.com//www/gtr-bnd/ -v
> >
> > i just recently tried uploading an entire FOLDER using this same code
> structure
> > and the process creates a 0kb file on the ftp server rather than a new
> folder
> > with all the housed files (and other folders).
>
> This is the relevant FAQ item:
> http://curl.haxx.se/docs/faq.html#Can_I_do_recursive_fetches_with
> curl is designed for transferring individual URLs, not bunches at once like
> you would want to do in transferring a directory full of files. You can
> do that with a scripted loop of some sort, like this in bash:
>
> for f in folder/*; do curl -T "$f" -u user:pass ftp://some-site/dir/; done
>
> or this in Windows:
>
> for %f in (folder\*) do curl -T %f -u user:pass ftp://some-site/dir/
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web change of address
> service
> Let webmasters know that your web site has moved
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Samuel Fitz
sam_at_samfitz.com
307.413.4907

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-11-03