Xojo.IO.FolderItem.CopyTo
From Xojo Documentation
Method
Xojo.IO.FolderItem.CopyTo(destination As Xojo.IO.FolderItem)
Supported for all project types and targets.
Supported for all project types and targets.
Copies the FolderItem to the specified destination Folderitem.
Notes
If destination is a folder, then the FolderItem is copied into the folder.
If destination is a file and the file exists, the copy is cancelled and a RuntimeException is raised. You'll need to first delete the destination file before copying the original.
If the source FolderItem is a folder, then the folder and all its contents are recursively copied.
Exceptions
- RuntimeException when the destination is a file and the file exists.
Sample Code
Copy a file: