MoveFolder
Moves the folder from one folder to another within a cabinet or across cabinet.
Public Function MoveFolder(ByVal FolderId As Long, ByVal DestinationCabId As Integer, ByVal DestinationFolderId As Long,
ByVal FolderName As String, ByVal DuplicateNameFlag As String, ByRef FolderProp() As Byte) As Long
Parameters
In/out |
Name |
Data type |
Description |
In |
FolderId |
Long |
Index of the folder being moved |
In |
DestinationCabId |
Integer |
Index of destination cabinet |
In |
DestinationFolderId |
Long |
Index of destination folder |
In |
FolderName |
String |
Name of Folder |
In |
DuplicateNameFlag |
String |
Whether duplicate name is to be allowed |
In/Out |
FolderProp |
Byte |
Properties of folder in the form of byte array as a return parameter |
Description
This function is called on both local and shared cabinet. It is called when any folder is moved to some other folder either in the same cabinet or other cabinet. Folder properties of the moved folder are returned after getting successfully moved.
Return value
Name |
Description |
1 |
In case of success |
-2 |
Invalid operation in read only cabinet |
-3 |
Cabinet not connected |
-201 |
Insufficient rights for the current operation |
Example
Dim FolderId As Long
Dim DestinationCabId As Integer
Dim DestinationFolderId As Long
Dim FolderName As String
Dim DuplicateNameFlag As String
Dim FolderProp() As Byte
Dim lRetval As Long
Dim gPDb As PanDb.pdbCls
Set gPDb = New PanDb.pdbCls
FolderId = 45
DestinationCabId = 3
DestinationFolderId = 34
FolderName = “”
DuplicateNameFlag = “N”
lRetVal=gPDb.MoveFolder(FolderId,DestinationCabId,DestinationFolderId,FolderName,DuplicateNameFlag,FolderProp)
if lRetVal <> NG_SUCCESS Then
MsgBox gPDb.ErrDescription, vbInformation
Screen.MousePointer = vbNormal
Exit Sub
End If