X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Richard Ivarson Subject: Webdav batch file transfer: curl, wget Date: Wed, 12 Sep 2007 12:27:06 +0200 Lines: 55 Message-ID: References: <75cc17ac0709111359u1b7635ej4cc3bab19658af46 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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/