Mail Archives: cygwin/2007/09/12/06:29:15
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 -