Encapsulates the AutoMate™ action in the “File I/O” group, “Copy a file.” The method attempts to copy the specified file from one location to another.
Declaration
function AMCopyFile (varSourceFile As Variant,
varDestFile As Variant) As Integer
Parameters
varSourceFile
The full path to the file to be copied.
varDestFile
The full path to the destination.
Description
The AMCopyFile method attempts to copy the source file varSourceFile to the location and name specified by varDestFile.
If the file is successfully copied, AMCopyFile returns “0.” If an error occurs, AMCopyFile returns “1.” In this case, use the GetLastError property to retrieve the error message AutoMate™ generated when trying to copy the file.
The AMCopyFile method supports wildcards.