move - UDM Command

Syntax

move source-logical-name=source-file-specification [destination-logical-name=destination-file-specification]

Description

The move command initiates a move operation.

A move operation is similar to a copy operation. The only difference between a move command and a copy command is that after you move a file, it is deleted from the source server from which it was moved.

If the move command cannot delete the source file after the move, the move operation has failed; move deletes the destination file.

z/OS

If the source side of the move is in the DD file system, or if the source is a GDG, an error will be issued specifying that the move command is not supported.


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.

Note

As with a copy command, if an error is encountered, a move 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 move operation.

file-specification

File or files to be copied. It can be a single filename or a complete path.

The filename (or filename portion of the path) can contain wildcard characters:

  • Wildcard * represents for zero or more characters.
  • Wildcard ? indicates a single character.

destination-logical-name

Logical name of the destination server in the move operation.

file-specification

Complete path or file name for the destination file.

Examples

To move file test.txt - from a machine with logical name src to a machine with logical name dst - as test.bak:


To move all files in the current directory from a machine with logical name src to the other machine in the transfer session: