Page 1 of 1

davcopy a webdav connection

PostPosted:Sun Apr 03, 2011 6:06 pm
by rottdogg
After looking at a few issues with WebDav and how the windows based webdav clients do not like the format of the url I started to comb the web looking for a solution. I found one that looks pretty interesting. It's called "davcopy". Now I am not the developer or even associated in any way with this program. I just noticed that it will accept a URL like "http://host:8080/OpenKM/repository/defa ... testfolder"
On the website it states that in using the /user and /password flags that this is not hidden and to be aware of that. It does not look like it has been updated in a while but I tried it and it seems to be doing the trick for me.
http://www.bluedoglimited.com/Downloads ... vCopy.aspx
Code: Select all
I:\>C:\temp\davcopy\davcopy.exe 0-9/*.* http://host:8080/OpenKM/repository/default/okm:root/testfolder/ /E /USER:<user> /PASSWORD:<passwd>
OpenKM 5.03 server:
OS: Ubuntu 10.04 32bit
ker: 2.6.32-30-generic
I use the path /opt/jboss-4.2.3.GA
Copy from win xp 32bit

If this has been posted before I do apologize but a search for the word davcopy turned up nothing.

Re: davcopy a webdav connection

PostPosted:Sun Apr 03, 2011 9:01 pm
by jllort
Have you successfully tested with OpenKM ? In case it'll be afirmative I'll include in documentation wiki.

Re: davcopy a webdav connection

PostPosted:Mon Apr 04, 2011 2:50 am
by rottdogg
Yes I have, it actualy worked so well that it crashed jboss due to high mem usage.
1 Dual core 2.7ghz proc with 2G of memory and a single HD (testing system) imported roughly ~40k files and folders in 2 hours.
The main issue was the convert command taking up 75% memory (three processes eachtaking up that much) and 50% CPU each.
I can add a sleep command to a for statement later to fix that.
The issue I am running into is this.
Code: Select all
forfiles -p C:\temp -s -d  -c "Cmd /C C:\temp\davcopy\davcopy.exe @relpath http://dms:8080/OpenKM/repository/default/okm:root/testfolder/ /E /USER:<user> /PASSWORD:<passwd>"
Everytime I run this command I get a "The system cannot find the path specified." This looks like it is caused by the fact that davcopy seems to use the old copy command and not xcopy and FORFILES adds double quotes around the @PATH or @FILE or @RELPATH.
Here is my reasoning:
C:\Temp>copy "C:\temp\test.txt" D:\temp\
The system cannot find the path specified.
0 file(s) copied.

C:\Temp>xcopy "C:\temp\test.txt" D:\temp\
C:\temp\roboflags.txt
1 File(s) copied

If someone could help me with an alternative?

P.S. I tried using robocopy with the /L flag just to list the files and not to actually copy them, but it lists even the files it skips and any reader script that is seeing that will have high cpu and memory going through that file.

Re: davcopy a webdav connection

PostPosted:Mon Apr 04, 2011 2:54 am
by rottdogg
Sorry for the extra post, but that command is supposed to be -d -1 for one day back. I have no idea how I forgot to post that fact but it still does not work with the same error.

Re: davcopy a webdav connection

PostPosted:Mon Apr 04, 2011 6:43 am
by jllort
The problem of davcopy could be seems to be, it's application specialized for share point ... and not only upload files, uploads metadata too. And here you could get some problem, I'm not sure on it.

I think if you're trying importing some content the best scenario for doing it with webdav is connect OpenKM as network resource ( z: ) and then you can use the normal commands available in the OS, xcopy etc.. for doing it. Or you can use some application specialized on folders synchronization.