delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/12/06:29:15

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Richard Ivarson <RiIvarson AT gmail DOT com>
Subject: Webdav batch file transfer: curl, wget
Date: Wed, 12 Sep 2007 12:27:06 +0200
Lines: 55
Message-ID: <fc8evd$4e5$1@sea.gmane.org>
References: <fbrfm3$942$1 AT sea DOT gmane DOT org> <75cc17ac0709111359u1b7635ej4cc3bab19658af46 AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <75cc17ac0709111359u1b7635ej4cc3bab19658af46@mail.gmail.com>
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

Gregg Reynolds schrieb:
> On 9/7/07, Richard Ivarson <RiIvarson AT gmail DOT com> wrote:
>> For example, until now I've to do these steps:
>>
>>  > cadaver https://my_webdav.site.com
>> this asks for username and password, then enters cadaver's command mode
>>
>> there I've to enter:
>> * mget the_files
>> * quit
> 
> If all you're only doing standard http methods try wget.  curl if you
> need real webdav methods.

Hi Gregg,

thanks for this good hint!

Indeed I'd just like to fetch, say, five files from my Webdav server
automatically with a script (which I start however and so can enter one
password at its begin, for example)

  A) *wget*
Fetching the files with wget works:
  wget --user=NAME --password=PASS https://webdavserver.com/folder/fileAA.txt

I've seen two handicaps:
1) I want to use a script so I don't want to store the password in the script
file. Ommiting "--password" doesn't ask for it, however.
2) Not a big one because I could specify them: I'd like to be able to get
fileBB ... fileEE.txt too.


  B) *curl*
You mentioned "curl" which I didn't know yet but I do now (a bit) ! It
actually does what I've been looking for. So no need to run a complex
"expect" command on "cadaver".

  curl --user NAME:PASSWORD
https://webdavserver.com/folder/{fileAA,fileBB,fileCC,fileDD,fileEE,}.txt -O
-O -O -O -O


Just great. How I love these Unix tools - and Cygwin which makes Windows 
useable. And of course the people helping each other.

Btw, I still got two small questions:
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).
2) What actually is the main difference between wget and curl ?

Again thanks and all the best.

-ric



--
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