Diagram

Elements

LocalTarget
References Notes

A local target is considered to be located on the server where the YADE Client is operated, i.e. in the local file system.

Element Type Required Description
LocalPreProcessing [LocalPreProcessingType]
  • Occurrence: 0..1
Optional

Specifies commands that are executed on the server where the YADE Client is located before transfer of files. This includes shell commands.

LocalPreProcessingType / CommandBeforeFile
  • Occurrence: 0..1
Optional
References Notes

Specifies the commands to be executed for each file on the server before transfer of files.

  • For an SFTP server: the SSH channel has to be available and then the commands have to be shell commands.
  • For an FTP server: FTP commands have to be used
  • For the LocalSource: you can use shell commands, depending on the operating system (Unix, Windows).

The following special variables are available:

  • See:
  • Date/time variables:
    • $date - the current date in yyyy-MM-dd format.
    • $time - the current time in Format HH:mm:ss format.
  • Directory variables:
    • ${TargetDirFullName} - the directory where files are stored on the target system.
    • ${SourceDirFullName} - the directory where files are stored on the source system.
  • The name of a file on the target host:
    • ${TargetFileFullName}
    • ${TargetFileRelativeName}
    • ${TargetFileBaseName}
    • ${TargetFileParentFullName}
    • ${TargetFileParentBaseName}
  • The name of a file on the target host during transfer (a file name can be prefixed or suffixed):
    • ${TargetTransferFileFullName}
    • ${TargetTransferFileRelativeName}
    • ${TargetTransferFileBaseName}
    • ${TargetTransferFileParentFullName}
    • ${TargetTransferFileParentBaseName}
  • The name of a file on the source host:
    • ${SourceFileFullName}
    • ${SourceFileRelativeName}
    • ${SourceFileBaseName}
    • ${SourceFileParentFullName}
    • ${SourceFileParentBaseName}
  • The name of a file on the source host after Rename operation:
    • ${SourceFileRenamedFullName}
    • ${SourceFileRenamedRelativeName}
    • ${SourceFileRenamedBaseName}
    • ${SourceFileRenamedParentFullName}
    • ${SourceFileRenamedParentBaseName}
enable_for_skipped_transfer
Notes
LocalPreProcessingType / CommandBeforeOperation string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 0..1
Optional
References Notes

Commands to be executed before the transfer of files starts.

LocalPostProcessing [LocalPostProcessingType]
  • Occurrence: 0..1
Optional

Specifies commands that are executed on the server where the YADE Client is located after transfer of files. This includes shell commands.

LocalPostProcessingType / CommandAfterFile
  • Occurrence: 0..1
Optional
References Notes

Specifies the commands to be executed for each file on the server after the transfer and the Rename.

The following environment variables are available in the SFTPPostProcessing and LocalPostProcessing:

  • See YADE-471.
  • YADE_FILE_TRANSFER_STATUS
    • possible values: transferUndefined, waiting4transfer, transferring, transferInProgress, transferred, transfer_skipped, transfer_has_errors, transfer_aborted, compressed, notOverwritten, deleted, renamed, ignoredDueToZerobyteConstraint, setBack, polling
  • YADE_FILE_IS_TRANSFERRED
    • possible values: 0, 1

The following special variables are available:

  • See:
  • Date/time variables:
    • $date - the current date in yyyy-MM-dd format.
    • $time - the current time in Format HH:mm:ss format.
  • Directory variables:
    • ${TargetDirFullName} - the directory where files are stored on the target system.
    • ${SourceDirFullName} - the directory where files are stored on the source system.
  • The name of a file on the target host:
    • ${TargetFileFullName}
    • ${TargetFileRelativeName}
    • ${TargetFileBaseName}
    • ${TargetFileParentFullName}
    • ${TargetFileParentBaseName}
  • The name of a file on the target host during transfer (a file name can be prefixed or suffixed):
    • ${TargetTransferFileFullName}
    • ${TargetTransferFileRelativeName}
    • ${TargetTransferFileBaseName}
    • ${TargetTransferFileParentFullName}
    • ${TargetTransferFileParentBaseName}
  • The name of a file on the source host:
    • ${SourceFileFullName}
    • ${SourceFileRelativeName}
    • ${SourceFileBaseName}
    • ${SourceFileParentFullName}
    • ${SourceFileParentBaseName}
  • The name of a file on the source host after Rename operation:
    • ${SourceFileRenamedFullName}
    • ${SourceFileRenamedRelativeName}
    • ${SourceFileRenamedBaseName}
    • ${SourceFileRenamedParentFullName}
    • ${SourceFileRenamedParentBaseName}
disable_for_skipped_transfer
Notes
LocalPostProcessingType / CommandAfterOperationOnSuccess string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 0..1
Optional
References Notes

Post transfer commands execution in case of the successful transfers.

Built-in command functions:

  • REMOVE_DIRECTORY()
    • YADE-590 Availability starting with 1.13.14
    • Removes the directory defined with the corresponding Directory element, including all files and subdirectories.
LocalPostProcessingType / CommandAfterOperationOnError string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 0..1
Optional
References Notes

Post transfer commands execution on transfer error.

Built-in command functions:

  • REMOVE_DIRECTORY()
    • YADE-590 Availability starting with 1.13.14
    • Removes the directory defined with the corresponding Directory element, including all files and subdirectories.
LocalPostProcessingType / CommandAfterOperationFinal string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 0..1
Optional
References Notes

Post transfer commands execution at transfer end independent of the transfer status.

Built-in command functions:

  • REMOVE_DIRECTORY()
    • YADE-590 Availability starting with 1.13.14
    • Removes the directory defined with the corresponding Directory element, including all files and subdirectories.
LocalPostProcessingType / CommandBeforeRename string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 0..1
Optional
References Notes

Specifies the commands to be executed for each file on the server after the transfer but before a Rename.

  • For an SFTP server: the SSH channel has to be available and then the commands have to be shell commands.
  • For an FTP server: FTP commands have to be used
  • For the LocalSource: you can use shell commands, depending on the operating system (Unix, Windows).

The following special variables are available:

  • See:
  • Date/time variables:
    • $date - the current date in yyyy-MM-dd format.
    • $time - the current time in Format HH:mm:ss format.
  • Directory variables:
    • ${TargetDirFullName} - the directory where files are stored on the target system.
    • ${SourceDirFullName} - the directory where files are stored on the source system.
  • The name of a file on the target host:
    • ${TargetFileFullName}
    • ${TargetFileRelativeName}
    • ${TargetFileBaseName}
    • ${TargetFileParentFullName}
    • ${TargetFileParentBaseName}
  • The name of a file on the target host during transfer (a file name can be prefixed or suffixed):
    • ${TargetTransferFileFullName}
    • ${TargetTransferFileRelativeName}
    • ${TargetTransferFileBaseName}
    • ${TargetTransferFileParentFullName}
    • ${TargetTransferFileParentBaseName}
  • The name of a file on the source host:
    • ${SourceFileFullName}
    • ${SourceFileRelativeName}
    • ${SourceFileBaseName}
    • ${SourceFileParentFullName}
    • ${SourceFileParentBaseName}
  • The name of a file on the source host after Rename operation:
    • ${SourceFileRenamedFullName}
    • ${SourceFileRenamedRelativeName}
    • ${SourceFileRenamedBaseName}
    • ${SourceFileRenamedParentFullName}
    • ${SourceFileRenamedParentBaseName}
ProcessingCommandDelimiter
  • Occurrence: 0..1
Optional
References Notes

A command delimiter option for executing the pre- and postcommands

Rename [RenameType]
  • Occurrence: 0..1
Optional
References Notes

A Rename operation renames files during transfer from a source system to the target system.

Renamimg is performed either for files in the source system or in the target system depending on the occurence of the Rename parameter. The following applies to use with a Copy operation:

  • When used with the CopySourceFragmentRef and respective fragment reference element the files will be renamed on the source server.
  • When used with the CopyTargetFragmentRef and respective fragment reference element the files will be renamed on the target server. Source files remain unchanged.
The same behavior applies to renaming with Move operations accordingly.
RenameType / ReplaceWhat string
  • Min: 1
  • Whitespace: preserve
  • Occurrence: 1
Required
References Notes

This parameter is used to rename files. It requires use of the parameter ReplaceWith. The rename operation is performed by specifying

  • what part of a filename should be replaced and
  • with which replacement a file should be renamed.

This parameter expects a regular expression for a filename pattern. If the expression matches the filename then the regular expression groups in the match are replaced.

Use with capturing groups

  • For replacement "capturing groups" are used. Only the content of the capturing groups is replaced.
  • Multiple replacements are separated by a semicolon ";".

Example:

  • ReplaceWhat: (1)abc(12)def(.*)
  • ReplaceWith: A;BB;CCC
These setting result in the following rename operation:
  • Name of original file: 1abc12def123.txt
  • Name of renamed file: AabcBBdefCCC

Use without capturing groups

If no "capturing groups" are specified then the entire match is replaced.

Example:

  • ReplareWhat: Hello
  • ReplaceWith: 1234
These setting result in the following rename operation:
  • Name of original file: Hello_World.txt
  • Name of renamed file: 1234_World.txt

For further information see java.util.regex.Pattern

RenameType / ReplaceWith string
  • Whitespace: preserve
  • Occurrence: 1
Required
References Notes

This parameter is used to rename files. It requires use of the parameter ReplaceWhat. The rename operation is performed by specifying

  • what part of a filename should be replaced and
  • with which replacement a file should be renamed.

If a match has been found as specified by the ReplaceWhat parameter then the following replacements can be applied:

  • String replacement: any string
  • Masked replacement: aa;[filename:];bb
A masked replacement supports masks for substitution in the filename with format strings that are enclosed with [ and ]. The following format strings are supported:
  • [date: date format ]
    date format must be a valid Java data format string, e.g. yyyyMMddHHmmss, yyyy-MM-dd.HHmmss etc.
  • [filename:]
    will be substituted by the original file name including the file extension
  • [filename:lowercase]
    will be substituted by the original file name including the file extension with all characters converted to lower case.
  • [filename:uppercase]
    will be substituted by the original file name including the file extension with all characters converted to upper case

Use with capturing groups

  • For replacement "capturing groups" are used. Only the content of the capturing groups is replaced.
  • Multiple replacements are separated by a semicolon ";".

Example:

  • ReplaceWhat: (1)abc(12)def(.*)
  • ReplaceWith: A;BB;CCC
These setting result in the following rename operation:
  • Name of original file: 1abc12def123.txt
  • Name of renamed file: AabcBBdefCCC

Use without capturing groups

If no "capturing groups" are specified then the entire match is replaced.

Example:

  • ReplareWhat: Hello
  • ReplaceWith: 1234
These setting result in the following rename operation:
  • Name of original file: Hello_World.txt
  • Name of renamed file: 1234_World.txt

For further information see java.util.regex.Pattern

CredentialStoreFragmentRef
  • Occurrence: 0..1
Optional
References Notes

This element references the fragment that is used to insert configuration items from a secure store into a file transfer configuration.

Any number of reusable CredentialStoreFragment elements can be configured and are distinguished by YADE based on their name attribute.

The reference to a fragment is based on the value of the ref attribute of this element to the corresponding name attribute of the CredentialStoreFragment element.

Support for a jump host.

Note: Availability starting with YADE-488.

ref

This attribute identifies the fragment that is used for inserting secure configuration items.

 

  • No labels