User Guide
254 Chapter 14 Scripting the Visual Tools Object Model
CopyFile
Syntax CopyFile(const SourceFile: WideString; const TargetFile: WideString):
Integer;
Description Copies the source file to the target file location.
CopyFileExtended
Syntax CopyFileExtended(const SourceFile: WideString; const TargetFile: Wide-
String; CreateFolder: WordBool; UploadOnlyIfNewer: WordBool; En-
cryptCFML: WordBool): Integer;
Description Boolean. Copies the source file to the target file location and provides additional
arguments.
CreateDir
Syntax CreateDir(PathName: WideString): Integer;
Description Directory creation primitive, returns 0 for success, or RDS error code for failure.
FileExists
Syntax FileExists(const wsFileName: WideString): WordBool;
Description Boolean. Checks to see if a file exists.
GetDeployServerName
Syntax GetDeployServer(nServer:integer): WideString;
Description Returns the name of the server in the server list based on the index nServer. The
internal server list array starts from a zero base.
GetDeployServerStatus
Syntax GetDeployServerStatus(nServer:integer):WideString;
Description Returns the index of the server in the server list based on the index nServer. The
internal server list array starts from a zero base.
GetDeployTargetName
Syntax GetDeployTargetName(const wsServerName:Widestring, const wsFolder-
Name:Widestring, nFileIndex:Integer): WideString;
Description Calculates the target deployment file name using the passed-in server name, folder
name, and an integer representing the folder file to use. Use this method is mainly
when iterating through all the files in a folder. It calculates a server file target path,