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