MoveFile
Moves files or folders to a new location. To move a single file or folder, specify Name or Id. To move a list of files or folders, specify NameList or IdList. To move files or folders that match the specified conditions, specify Search.
Elements
Target
String. The new location for the file or folder. The following rules apply:
*If Target is a file, the operation fails if the source contains a folder.
*If the source is a folder and a folder with the same name exists in the target location, the operation fails.
*If the source is a file and a file with an identical name exists in the target location, the existing file in the target location is versioned or replaced, depending on the setting of the ReplaceExisting tag. If the existing file has any dependencies, the file is not replaced regardless of the ReplaceExisting setting.
*If Target is a folder that does not exist, a folder is created.
WorkingFolderName
String. The name of the working folder of the file or folder to move. Specify either WorkingFolderName or WorkingFolderId.
WorkingFolderId
String. The ID of the working folder of the file or folder to move. Specify either WorkingFolderId or WorkingFolderName.
Recursive
Boolean. Specifies whether to search subfolders. If True, the search includes subfolders. The default value is False.
Search
FileSearch. The search condition that specifies which folders or files to move.
IdList
ArrayOfString. The list of file or folder IDs to move. Specify either IdList or NameList.
NameList
ArrayOfString. The list of file or folder names to move. Specify either NameList or IdList.
Id
String. The ID of the single file or folder to move. Specify either Id or Name.
Name
String. The name of the single file or folder to move. Specify either Name or Id.
ReplaceExisting
Boolean. If True, the existing file, if one exists, is replaced. If the existing file has any dependencies, it is not replaced. If False or the existing file has any dependencies, the file is versioned. The default value is True.
MaxVersions
Long. The maximum number of versions to create. MaxVersions applies only if a file is moved. If a folder is moved, MaxVersions is ignored.
LatestVersionOnly
Boolean. Specifies whether all versions or only the latest version of the file is moved. Used only when a Search tag is specified. If True, only the latest version of the file is moved. The default value is False.