Set File Attributes activity
The Set File Attributes activity sets common file attributes, such as timestamps, size, permissions, and UID/GID, for a file or directory on an SFTP server.
A good practice is to use the Get File List activity to return a list of files and their attributes first. Then, when you moved a file from a source host to a target host, use the Set File Attributes activity to set the source file attributes on the target file. This is demonstrated in the SFTP File Transferworkflow.
Input variables
| Variable | Description |
|---|---|
| sourceHost | Name or IP address of the server containing the file or directory whose attributes you want to change. |
| sourcePort | Port number to use to communicate with the target server. The default port number is 22. |
| sourceFilePath | Full path to the file or directory whose attributes you want to change. |
| userID | User ID attribute to apply to the file or directory. The UID and GUID variables must be set together as a pair. |
| groupID | Group ID attribute to apply to the file or directory. The UID and GUID variables must be set together as a pair. |
| permissions | File or directory permissions to set for the user and group specified. This
value must be expressed as an integer, such as 16877, which
defines these permissions: rwxr-xr-x. Remarque : The permissions
number is an internal value returned by the Get File List activity. |
| accessTimestamp | Override the timestamp when the file or directory was last accessed. The access and modification timestamps must be set together as a pair. |
| modificationTimestamp | Override the timestamp when the file or directory was last modified. The access and modification timestamps must be set together as a pair. |
| sizeInBytes | Size of the file or directory, expressed in bytes. |
| sourceCredentialTag | Specific Credential aliases for Orchestration activities this activity must use to run SSH commands on the host. |
Output variables
| Variable | Description |
|---|---|
| errorMessage | The executionResult.errorMessages from the Activity designer parsing sources. If this variable is not null, the operation has failed. |
| result | Text message advising that the command was executed successfully. |
Conditions
| Condition | Description |
|---|---|
| Success | The activity succeeded in changing the attributes of the specified file or directory. |
| Failure | The activity failed to change the attributes of the specified file or directory. |