delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/13/10:58:54

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <75cc17ac0709130758i1c611751i13e793c78e79bdcc@mail.gmail.com>
Date: Thu, 13 Sep 2007 09:58:22 -0500
From: "Gregg Reynolds" <dev AT mobileink DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Webdav batch file transfer: curl, wget
In-Reply-To: <fc8evd$4e5$1@sea.gmane.org>
MIME-Version: 1.0
References: <fbrfm3$942$1 AT sea DOT gmane DOT org> <75cc17ac0709111359u1b7635ej4cc3bab19658af46 AT mail DOT gmail DOT com> <fc8evd$4e5$1 AT sea DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 9/12/07, Richard Ivarson <RiIvarson AT gmail DOT com> wrote:
>
>   curl --user NAME:PASSWORD
> https://webdavserver.com/folder/{fileAA,fileBB,fileCC,fileDD,fileEE,}.txt -O
> -O -O -O -O
...
> 1) Is there a simpler way than the five "-O"'s I used? Would a wildcard be
> possible (didn't find a mention in the manpage, however).

Dunno.  I actually haven't used it much; I came across it when I
wanted a tool for managing webdav resources, but ran into a problem
involving %-encoding of the space character.  Never found out if it
was a problem with curl or with the server, but I found a different
method and haven't had time to go back to curl.  What I really want is
a tool that can manage webdav properties in batch mode; if you know of
one please let me know.  You could do it with curl, but since curl
doesn't natively understand webdav it would be a good bit of work.

For the -O issue: as with any tool that doesn't quite behave the way
you like, you can always try The Unix Way:  feed the output of one
small tool into another.  Download without -O, then use a shell
command or script to convert the results.  Maybe something along the
lines of

  $ find ./ -name "*.txt" -exec basename {} \;.

You might even be able to pipe the curl command output into basename.

-gregg

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019