XCopyFolder
Copy a folder to other cabinet.
Public Function XCopyFolder(ByVal FolderId As Long,
ByVal DestinationCabId As Long,
ByVal DestinationId As Long,
ByVal DuplicateNameFlag As String,
ByVal IncludeSubFolder As String,
Parameters
In/out |
Name |
Data type |
Description |
In |
FolderId |
Long |
Folder index of the folder. |
In |
DestinationCabld |
Long |
Specifies the Cabinet ID where the folder has to be copied. |
In |
DestinationId |
Long |
Specifies the Destination ID. |
In |
DuplicateNameFlag |
String |
Specifies the duplicate name for the folder that is copied. |
In |
IncludeSubFolder |
String |
Specifies the subfolders of the specified folder for copying. You can assign ‘Y’ for Yes & ‘N’ for No |
Out |
FolderProp |
Byte [TagFolder] |
Specifies a byte array for the Folder properties structure. |
Description
This function is used to copy folder across cabinets. This function is used by Omnidocs Desktop.
Name |
Description |
NG_SUCCESS |
In case of success |
-1 |
Invalid operation |
-2 |
Invalid operation in read only cabinet |
-3 |
Cabinet not connected |
-11 |
Invalid folder index |
-20 |
Destination folder locked |
-16 |
A folder having same name already exists in the destination folder. |
-90 |
Cannot associate Data Class or Data Class Values with some documents or folders, as same values are already associated with a document or folder' or 'Dataclass already exists and you don't have rights on that dataclass'." |
-200 |
Operation cancelled by user |
-201 |
Insufficient rights for the current operation |
Example
Dim lRetval As Long
Dim lFolderId As Long
Dim lDestinationCabId As Long
Dim lDestinationFoldId As Long
Dim DuplicateNameFlag As String,
Dim bFolderProp() As Byte
Dim lFolderCount As Long
Dim udtFolder As TagFolder
lFolderId = 101
lDestinationCabId = PanObj.CabinetIndex
lDestinationFoldId = 100
lRetval = PanObj.XCopyFolder(lFolderId, lDestinationCabId, lDestinationFoldId,
"N", bFolderProp)
If lRetval = 1 Then
MsgBox "Success"
Call CopyMemory(udtFolder, bFolderProp(0), Len(udtFolder))
MsgBox udtFolder.FolderId & ";" & udtFolder.FolderName
Else
MsgBox PanObj.ErrDescription
End If
End Sub