CopyFile
A complex data type describes a copied file or list of files. To copy a single file or folder, specify Name or Id. To copy a list of files or folders, specify NameList or IdList. To copy files or folders that match specific 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 Target is a folder that does not exist, a folder is created.
*If Target is a folder and the source contains a single folder, the contents of the source folder are copied to the target folder and merged with target folder contents.
*If Target is a folder and the source contains a single file or multiple files and folders, the source files and folders are copied to the target folders. All source folders are copied as children of the target folder.
WorkingFolderName
String. The name of the working folder of the file or folder to copy. Specify either WorkingFolderName or WorkingFolderId.
WorkingFolderId
String. The ID of the working folder of the file or folder to copy. 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 copy.
IdList
ArrayOfString. The list of file or folder IDs to copy. Specify either IdList or NameList.
NameList
ArrayOfString. The list of file or folder names to copy. Specify either NameList or IdList.
Id
String. The ID of the single file or folder to copy. Specify either Id or Name.
Name
String. The name of the single file or folder to copy. Specify either Name or Id.
ReplaceExisting
Boolean. If True, the copied file replaces the existing file, if one exists. If the existing file has any dependencies, it is not replaced regardless of the ReplaceExisting setting. If False or if the existing file has any dependencies, a new version of the file is created. The default value is True.
MaxVersions
Long. The maximum number of versions to create. MaxVersions applies only for files and is ignored for folders.
LatestVersionOnly
Boolean. Specifies whether all versions of the file are copied or only the latest version. Used only when a Search tag is specified. If True, only the latest version of the file that matches the search criteria is copied. If False, all versions of the file are copied. The default value is False.