Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.13.28 Moving a file

Function

This plug-in moves the specified file or folder to the specified destination file or folder.

The path of the target file or folder is specified by the common.sourceMoveTargetPath property. The path of the destination file or folder is specified by the common.destMoveTargetPath property.

The values of these properties cannot include wildcard characters.

If a file or folder that has the same name as the specified destination file or folder already exists, this plug-in terminates abnormally without overwriting the existing file or folder.

Non-existent folders included in the path of the destination file or folder are automatically created.

If the OS of the execution-target server is Windows, to move files or folders to a different location on the same drive, use the "move" command. To move files or folders between different drives, use the "xcopy" command, and then use the "del" or "rmdir" command to delete the source files or folders.

If the OS of the execution-target server is UNIX, use the "mv" command to move files or folders.

If the source path is a folder path, the destination path is treated as a folder path. If the source path is a file path, the destination path is treated as a file path.

Use situation

This plug-in can be used to move files or folders to other files or folders.

Prerequisites

For the most recent information about the prerequisite products in the system, the prerequisite products on the execution-target server, and the supported OSs on the execution-target server, see the Release Notes.

[Prerequisite products in the system]

JP1/Automatic Operation 11-00 or later

[Prerequisite products on the execution-target server]

None.

[Supported OSs on the execution-target server]

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter or Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

(5) Red Hat Enterprise Linux Server 6 (32-bit x86) or Red Hat Enterprise Linux Server 6 (64-bit x86_64)

(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) CentOS 6 (64-bit x86_64)

(9) CentOS 7 (64-bit x86_64)

(10) CentOS 8 (64-bit x86_64)

(11) Oracle Linux 8 (64-bit x86_64)

[Conditions for using the execution-target server]

None.

Cautions

(1) For the properties of this plug-in, do not specify any strings that include double quotation marks (") or single quotation marks (').

(2) For the source path (common.sourceMoveTargetPath property) or destination path (common.destMoveTargetPath property), do not specify only a drive letter (in Windows) or only the root directory (in UNIX). If you specify only a drive letter or only the root directory, the plug-in terminates abnormally.

(3) If the OS of the execution-target server is Windows, moving files or folders between drives might take a time depending on the size of the file or folder.

(4) If the command to move a file or folder fails, the source file or folder might become corrupted. For this reason, we recommend that you back up source files and folders in advance.

(5) If the OS of the execution-target server is Windows and you want to move a file to a different location on the same drive, make sure the length of the destination path does not exceed 259 characters. If this path length is exceeded, the plug-in terminates abnormally. If you are moving a folder, the plug-in can run normally, even when the path length of the destination folder exceeds the maximum length (247 characters) or the path length of a file in that folder exceeds the maximum length (259 characters). Note, however, that, in such cases, it might not be possible to rename the moved folder. For this reason, we recommend that you do not move folders whose path lengths exceed 247 characters, or files whose path lengths exceed 259 characters.

(6) If the OS of the execution-target server is Windows, you cannot move read-disabled files or folders between drives. If you attempt to move such files or folders, the plug-in terminates abnormally, and the files or folders being copied remain at the destination location. If the files or folders remaining at the destination are unnecessary, log in to the execution-target server, and then manually delete those files or folders.

Version

02.00.00

Plug-in tags

Control OS,Windows,Linux

Plug-in name displayed in the task log

osMoveFile

Return code

0: Normal

1: Error (An error was detected after the copy processing ended) An error was detected in the processing to delete the source file or folder that was moved.

12: Error (Mistake by user) Invalid property

27: Error (Check with the task log about the error detail) Unidentified error

41: Error (An error has been detected in the plug-in) Property not entered (An error has been detected in the component script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

common.sourceMoveTargetPath

Source path

Enter the full path of the source file or folder.

--

Input

R

common.destMoveTargetPath

Destination path

Enter the full path of the destination file or folder.

--

Input

R

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

--