copy - UDM Command
Syntax
copy source-logical-name=source-file-specification [destination-logical-name=destination-file-specification]
Description
The copy command initiates a copy operation.
source-logical-name specifies the logical name of the source server (logical name of either the primary or secondary transfer server specified in the open command).
source-file-specification specifies the complete path or single file name of the file or files to be copied.
Optionally, destination-logical-name and destination-file-specification can be used to specify the logical name of the destination server and the complete path or single file name for the destination file.
If destination-file-specification identifies only a file name, the current directory (or high-level qualifier) is used for the destination server. If destination-file-specification identifies only a directory, the file name specified in source-file-specification is used.
If destination-logical-name and destination-file-specification are not specified, the other server in the transfer session (that is, the server not specified in source-logical- name) is assumed to be the destination server and source-file-specification is used for the destination file name.
By default, the destination file has timestamps matching its creation date, last modification date, and access date. However, via attributes set in the attrib command, you can set the destination file to have timestamps matching the source file.
Note
If an error is encountered, a copy operation will halt, and control will be returned to the script.
Parameters
Parameter | Description |
---|---|
source-logical-name | Logical name of the server acting as the source of the transfer operation. |
source-file-specification | Complete path or single file name of the file or files to be copied. The file name (or file name portion of the path) can contain wildcard characters:
|
destination-logical-name | Logical name of the destination server in the transfer operation. |
destination-file-specification | Complete path or single file name for the destination file. |
Examples
To copy file test.txt - from a machine with logical name src to a machine with logical name dst - as test.bak:
copy src=test.txt dst=test.bak
To copy all files in the current directory from a machine with logical name src to the other machine in the transfer session:
copy src=*