I would like to programmatically move a group of files from a local directory into a WebDAV directory.
I am guessing a simple batch file would not work because it is a WebDAV directory. Note: the machine is Windows Server 2003 so there is no support for mapping a WebDAV directory to a drive letter so the drive just looks like this: http://dev1:8080/data/xml and cannot be made to look like //dev1/data/xml
Cadaver may allow you to write a batch script that does all this; otherwise you could use CURL directly, but you'd need to know a bit more about the actual WebDAV protocol (you'd basically need to locally traverse a directory, MKCOL for every subdirectory and PUT for every file).
I'm not sure how well either of these tools compile on Windows, but if it doesn't work out of the box, you could always run it on top of Cygwin. While you're using Cygwin, you can also just create standard shell scripts (/bin/sh or /bin/bash) which will likely actually be easier than windows' .BAT format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With