cURL / Mailing Lists / curl-users / Single Mail

curl-users

multiple upload syntax?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Aug 2003 16:23:46 +0200 (CEST)

Hi

I was thinking about how to add support for specifying multiple files to get
uploaded in a single command line, and I thought I'd better get your help.

Currently curl supports download of multiply specified URLs fine. Adding the
same level of support for uploads would be cool.

Now, how should such a command line syntax be?

Current command line for uploading one file:

  curl -T localfile ftp://site.com/remotedir/

or if we want to use a different file name on the remote side:

  curl -T localfile ftp://site.com/remotedir/remotefile

VERSION A:

  Multiple -T options allowed but all upload to the same URL:

        curl -T file1 -T file2 ftp://site.com/

VERSION B:

  One -T option for each provided URL:

        curl -T file1 ftp://site1.com/ -T file2 ftp://site2.com/

VERSION C:

  An extended version B: each -T can specify multiple files:

        curl -T {file1,file2} ftp://site.com/ -T {file3,file4} \
            ftp://site2.com/

Any comments? Any favourites? Any other suggestions?

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-19