| Function group | Execute on client | Platform(s) |
| FileOps | NO | All |
FileOps.$copyfile(cFromPath,cToPath)
Deprecated: copies the file specified in cFromPath to the file cToPath.The file named in cToPath must not already exist.
cToPath is the path to destination folder into which the file will be copied (if you include a file name in the cToPath the function will fail under macOS); the file to be copied must not already exist in the destination folder.
The function returns an error code, or zero if successful: see the FileOps function error codes.
To move a file, rather than copy it, use $movefile().
DoFileOps.$copyfile('c:\omnis\test.txt','c:\examples\test.txt')ReturnslError# copies 'test.txt' to the 'examples' folder
DoFileOps.$copyfile('c:\omnis\test.txt','c:\examples\test2.txt')ReturnslError# copies 'test.txt' to 'test2.txt' in the 'examples' folder
DoFileOps.$copyfile('c:\omnis\test.txt','c:\omnis\test2.txt')ReturnslError# copies 'test.txt' to 'test2.txt' in the same folder