Webdav automation

Hi,
I am required to automate file transfer to a Sharepoint Collection, I have failed in mounting the webdav as a file system using davfs2 so I am investigating Curl and Cadaver.

Cadaver is probably the easiest solution, I can successfully connect and transfer files. However can anyone advise how i can automate the connection as it always requires a username and password.

I have tried to create a netrc file in hom with the content:

machine http://url:port login=thisuser password=thispass

Unfortunately it always asks for a password when I attempt:

cadaver http:url:port

I also understand I could create a file and redirect it into Cadaver:

cadaver < thisfile.txt

Unfortunately I couldn't get this to work, it "seemed" to suggest it connected but no command did anything. I would prefer to get the netrc working.

I think the format of the netrc is correct, can anyone suggest why it might not be working as expected?

It seems very like ftp, so try something like the

ftp://name:password@host/file/path

form? Or something like sshpass to apply the password?

Apologies for not mentioning earlier,

I gave up with Cadaver as well and have scripted Curl. It works well, it has a few weird aspects but I can get it to do what I want relatively well.

Shame I didn't get the davfs mount to work properly though - you can close this thread though.