Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The example assumes that five test_*.txt files have previously been downloaded to the local ${USERPROFILE}\jade_demo\a directory before the example is run. Such a download can be carried out using the Simple simple JADE file transfer operation described in The JADE Client Command Line Interface - Tutorial 1 - Getting Started.

The file name part(s) to be replaced is/are defined in the replacing Replacing parameter with round brackets () and the new part(s) in the replacement Replacement parameter, separated by semi-colons.

...

  • The five test_*.txt files in the the a folder will be copied to the b folder under their original names. The source files will then be renamed as described above.
  • If a file is found but not transferred - because for example it has zero bytes and TransferZeroByteFiles is set to false then the file name will remain unchanged.

File cumulation

JADE can cumulate the contents of individual files to a single target file:

  • Files matching the file_spec FileSpec regular expression are cumulated together into a new file.
  • The CumulativeFileDelete element is used to specify whether an already existing CumulativeFile is deleted and a new, empty, CumulativeFile created before the content of the individual files being transferred is added to this file. (The CumulativeFile is by default opened in append mode.)
  • The individual, original files can be deleted if required in a Move operation or separate Remove operation.
  • There is not a de-cumulate parameter available at the moment.

...

ProtocolFragments are not specified in this configuration as both source and target are on the local file system. This has been done to allow write permissions at both source and target.

Profile

The three CumulateFiles CumulateFile elements are child elements of the TargetFileOptions element as can be seen in the screenshot below.

Note that
  • if the Rename operation in this example described here is specified for the transfer source, meaning that then the source files will be renamed and that the files copied to the target will not be. It is also possible to specify Rename for the transfer target, in which case the source files will remain unchanged for a copy Copy operation.
  • write permissions are required before names of files on a file system can be changed.

...

Opening the cumulative file text-files.txt in a text editor after transfer has been completed will show the content of all five individual files.

Note that this will not necessarily follow the order of arrival of files in the target system determines the order in which transfer of individual files was startedthey are added to the cumulative file.

Setting the CumulativeFileDelete parameter to false and running the transfer operation a number of times will show the that the this setting allows the ongoing addition of content to the CumulativeFile - a procedure that is commonly used, for example, for log files.