infoRouter Document Management System - Web Services API Documentation
Copy
Copies an existing document or a folder to a new location.
Syntax
[Visual Basic]
Public Function Copy(ByVal AuthenticationTicket As String, _
ByVal SourcePath As String,
ByVal DestinationPath As String) As System.Xml.XmlDocument
Parameters

AuthenticationTicket

infoRouter Authentication Ticket

SourcePath

The Source Path of a document or a folder on the server.

DestinationPath

The Destination Path of the document or the folder on the server.

Return Value
returns xml fragment.
<response success="true" error="">
if success = "true", the folder or document has been copied.
if success = "false", the error attribute returns the error description.
Remarks
The path refers to a folder or to a document.
The caller must have at least, "Read" permissions on the source and "Add" permissions on the target folder.
Example
Public Sub CopySample()
Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxx"
Const IR_SourcePath As String = "/Public/Images/ninepeople.jpg"
Const IR_DestinationPath As String = "/Public/sample/"

Dim IR_Obj As InfoRouter.srv
Dim xmlResponse As System.Xml.XmlElement
Try

IR_Obj = New InfoRouter.srv

xmlResponse = IR_Obj.Copy(IRAuthenticationTicket, _
IR_SourcePath, _
IR_DestinationPath)

If xmlResponse.GetAttribute("success") = "true" Then
Console.WriteLine("The document has been successfully Copied.")
Else
Console.WriteLine("The document cannot be copied.")
Console.WriteLine("server response:" & xmlResponse.GetAttribute("error"))
End If
xmlResponse = Nothing

Catch ex As Exception
Console.WriteLine("error:" & ex.Message)
Finally
IR_Obj = Nothing
End Try

End Sub
See Also
Move | Delete Document
Syntax based on infoRouter Document Management System Web Services API Version 7.0
Copyright() 1998-2003 Active Innovations, Inc.
infoRouter Document Management System