File Operation Action

(Requires EAM) The File Operation Action is used to read, write, rename, delete, concatenate, or perform a checksum on files.

The COM API has been modified to address the changes to the File Operation Action. As a result, some COM objects are no longer supported as of version 8.0.5: ICIFileActionParams: Operation, Path, IncludeSubdirsFlag, Contents, Encoding, OverwriteOption, NewNameMask, ExclusionMasks, and UseExclusionMasksFlag.

Refer to the COM API reference for details.

To define the File Operation Action

  1. In the right pane, in the Actions list, add the File: Operation Action to the rule, then click the link in the rule to open the File Action dialog box. The Action appears in the Event in the Rule Builder.

  2. Select the linked text (blue or red) to specify parameters for the Action.

  3. In the Operation list, click an operation:

    • Read - Read data from a file into a variable for processing (see note below)

    • Write - Write data to a file, creating the file if necessary, or appending to an existing file (see note below)

    • Rename - Rename and keep original (Copy) or remove the original (Move)

    • Delete - Delete one or more files

    • Concatenate - Concatenate the contents of two files and outputs the result into a destination file

    • Checksum - Obtain the hash for a file, which is useful for integrity checking

    By default, the File Action can only read or write 64KB of data. If you want to read and write more than 64KB, you will need to add the advanced properties MaxFileActionReadSize and MaxFileActionWriteSize and set the limits to how much you want to read/write. Refer to Advanced Properties for details.

  4. (Optional) Select the Use alternate credentials to access the file system check box, then provide the Username and Password needed to log in. Otherwise, it will use the EFT server service account.

  5. Click Next. The next page that appears depends on the operation selected, as shown below.

  6. After defining the Action, click Apply to save the Action.

Read

  1. Specify the Source path with variables or by selecting the folder icon and browsing.

  2. Select the Treat as success if the source file does not exist if you don't want this action to counted as a failure in that case.

  3. Click Next.

  4. Specify the Destination variable into which to store the read data, then click Finish. Refer to Flow: Variable Action for details of creating variables.

Write

  1. In the Source data box, specify the source data or content that you want to write to the destination. Writes are limited to 64KB, but that can be overridden via advanced properties. Use the variable (%) drop-down list to add EFT variables, such as %FS.FILE_NAME%. Click Next.

  2. Specify the Destination path with variables or by selecting the folder icon and browsing.

  3. Specify the Encoding (ANSI, UTF8, Unicode, UnicodeBigEndian), and what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.

Rename

  1. Specify the File(s) to rename with variables or by selecting the folder icon and browsing.

  2. Select the Include subdirectories check box to rename subdirectories also. Do not select the check box if the new filename consists of a full path.

  3. Select the Treat as success if the source file does not exist check box if you don't want this action to counted as a failure in that case.

  4. Click Next.

  5. Specify the New filename with variables or by selecting the folder icon and browsing.

  6. Specify what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.

Delete

  1. Specify the File(s) to delete with variables or by selecting the folder icon and browsing.

  2. Select the Include subdirectories check box to rename subdirectories also. Click Filters to exclude one or more files. Specify multiple files and wildcards with commas. For example *.txt,*.pd?.

  3. Select the Treat as success if the source file does not exist check box if you don't want this action to counted as a failure in that case.

  4. Click Finish.

Concatenate

  1. Specify the Source path for file A and file B with variables or by selecting the folder icon and browsing.

  2. Select the Treat as success if the source file does not exist check box if you don't want this action to counted as a failure in that case.

  3. Click Next.

  4. Specify the Concatenated file path with variables or by selecting the folder icon and browsing.

  5. Specify what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.

Checksum

  1. Specify the Source path with variables or by selecting the folder icon and browsing.

  1. Select the Treat as success if the source file does not exist check box if you don't want this action to counted as a failure in that case.

  2. Click Next.

  1. Specify the Destination path with variables or by selecting the folder icon and browsing.

  2. Specify the Checkusm algorithm (CRC32, MD5, SHA1, SHA256, SHA384, SHA512) and then click Finish.