Moves the specified file.
SYS_MoveFile (sToMove, sToMoveTo)
|sToMove||The name of the file to move. STRING.|
|sToMoveTo||The new name or directory for the file. STRING.|
SYS_MoveFile can be used to rename a file or move it to a different directory. An exception is raised if sToMove does not exist or if sToMoveTo is a file that already exists.
The files sToMove and sToMoveTo must reside on the same drive.
SYS_MoveFile 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.
[ ] const sOrigFile = "gui.t" [ ] const sNewFile = "gui.tmp" [ ] SYS_MoveFile (sOrigFile, sNewFile) [-] if SYS_FileExists (sNewFile) [ ] Print ("File was moved")