COPY

System Testing Supervisor Script Language.

Purpose

The COPY instruction transfers a binary or ASCII file from the System Testing Supervisor machine to a target machine, or the opposite.

Syntax

COPY [<hostname> :]<source> [<hostname> :]<destination> [/ASCII ]

where:

  • <source> is the absolute or relative filename of the file to be copied.

    <destination> is the absolute or relative path to which <source> is to be copied.

    <hostname> is the optional name of the source or destination machine.

Description

When the <hostname> is not specified, the filename refers to a local file on the System Testing Supervisor machine. When a <hostname> is specified, the filename refers to a file on the corresponding remote host.

COPY instructions can only transfer files from the System Testing Supervisor machine to a remote machine, or from a remote machine to the System Testing Supervisor machine. Transfers from one remote machine to another must be performed using two COPY instructions.

By default, transfers are in binary mode. If you specify the keyword /ASCII, the transfer is performed in character mode, which insures that text files are correctly copied between different types of machines. In binary mode, the target file's access permissions are updated so that the file is executable.

A filename may contain environment variables that are local to the System Testing Supervisor machine or that are defined on the remote machine. For more information, refer to the section on Environment variables.

If the file to be copied does not exist or is read-protected, you will receive an error message (see ERROR).

Path and filenames may contain long quoted pathnames, such as "C:\Program Files\HCL OneTest Embedded\HCL OneTest Embedded\".

Example

HOST target_1 IS antares

...

COPY localfile target_1:$HOME/file.bin

COPY target_1:remotefile localfile /ASCII

...

Related Topics

DELETE