Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.13.27 Confirm file or folder existence

Function

This plug-in checks whether a specified file exists on Windows or UNIX execution-target servers.

You can specify a folder as a target for existence check. Specify the folder for the check target file name (the common.targetFileName property).

As an existence check result of the specified file, store "true" (the specified file was found) or "false" (the specified file was not found) in the existence check result (the common.validationResult property).

The following is an explanation of the confirmation target file name (the common.targetFileName property):

- Specify a string of 256 or fewer characters.

The following is an explanation of the information about the confirmed file (the common.validationResultInformation property):

- If the existence check result (the common.validationResult property) is true, this plug-in stores the information about the checked file (folder).

- For Windows execution-target servers, stores the result of the Get-ItemProperty commandlet of PowerShell.

- For UNIX execution-target servers, stores the result of the ls command (-l option, -d option).

Use situation

You can use this plug-in to check the existence of files or folders.

Prerequisites

For the most recent information about the prerequisite products for the system, prerequisite products for the execution-target server, and the supported OSs for the execution-target server, see the release notes.

[Prerequisite products for the system]

JP1/Automatic Operation 11-00 or later

[Prerequisite products for the execution-target server]

None.

[Supported OSs for the execution-target server]

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

(2) Windows Server 2012 Standard/Datacenter, 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), 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)

(12) AIX V6

(13) AIX V7

[Conditions for using the execution-target server]

None

Cautions

(1) Do not use the following characters for the check target file name (the common.targetFileName property): left angle brackets (<), right angle brackets (>), vertical bars (|), semicolons (;), ampersands (&), asterisks (*), question marks (?), double quotation marks ("), percent signs (%), single quotation marks ('), left square brackets ([), right square brackets (]), or grave accent marks (`).

(2) This plug-in is intended for normal files and folders. Therefore, it does not handle drives and registries as files or folders.

(3) You cannot specify multiple files or folders for the check target.

Version

02.02.00

Plug-in tags

Gather OS information,Windows,Linux,AIX

Plug-in name displayed in the task log

osValidationFileAndFolder

Return code

0: Normal

12: Error (mistake by the user): A property is invalid.

27: Error (Check the details on the error in the task log.)

41: Error (An error was detected in the component.): A property was not entered. (An error was 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.targetFileName

File to be checked

Specify the full path to the file or folder whose existence you want to confirm.

--

Input

R

common.validationResult

Existence confirmation result

The result of confirming the existence is stored here. If the file exists, the value is true. If not, the value is false.

--

Output

O

common.validationResultInformation

Information about checked file

The information about the checked file is stored here.

--

Output

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O