SYS_CopyFile Function

Action

Copies a file.

Syntax

SYS_CopyFile (sToCopy, sToCopyTo)
Variable Description
sToCopy The name of the file to copy. STRING.
sToCopyTo The name of the file to copy to. STRING.

Notes

SYS_CopyFile copies the file specified by sToCopy to sToCopyTo. If sToCopyTo already exists, an exception is raised and the file is not overwritten.

SYS_CopyFile does not support wildcard characters in file names. Both sToCopy and sToCopyTo must uniquely identify a file.

Windows Platforms

SYS_CopyFile is executed by the Agent process, not the Silk Test Classic process. To affect the host process, use the function with the hHost notation or machine handle operator. For more information about the machine handle operator and hHost, see Machine handle operator.

Example

SYS_CopyFile ("test1.dat", "test2.dat")