curl-users
Re: globbing ftp uploads
Date: Mon, 2 Feb 2004 10:13:09 +0100 (CET)
On Fri, 30 Jan 2004, Doug McNutt wrote:
> This is what I did using a tcsh shell under Mac OS 10.2.3 with curl as
> delivered by Apple.:
>
> cd /Volumes/HEAO/MacBattery/Slides50k
> foreach fff (*.jpg)
> curl -n ftp://macnauchtan.com/public_html/pub/MacBattery/Slides50k/ -T $fff
> end
>
> It worked like a charm and I don't do things like that very often but. . .
>
> In an academic learning context, is there some way I could have used {}
> notation to ask curl to glob the 21 files and effect the transfer without
> the overhead of repeated connections?
You'd need to upgrade your curl first, since the upload globbing was not
supported until curl 7.10.8 and I don't think that is included in your OS
release.
Then, you'd probably do something like this:
* loop through all files and create a single uploadglob variable
* uploadglob should look like this {file1,file2,file3}
* then upload them all in one shot like this: curl ftp://upload.com/path/ -T
$uploadglob
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdnReceived on 2004-02-02