File Operation Action
(EFT Enterprise only) 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
-
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.
-
Select the linked text (blue or red) to specify parameters for the Action.
-
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 or more files and outputs the result onto a destination file
-
Checksum - Obtain the hash for a file, which is useful for integrity checking
-
(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.
-
Click Next. The next page that appears depends on the operation selected, as shown below.
-
After defining the Action, click Apply to save the Action.
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.
Read
-
Specify the Source path with variables or by selecting the folder icon and browsing.
-
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.
-
Click Next.
-
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
-
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.
-
Specify the Destination path with variables or by selecting the folder icon and browsing.
-
Specify the Encoding (ANSI, UTF8, Unicode, UnicodeBigEndian), and what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.
Rename
-
Specify the File(s) to rename with variables or by selecting the folder icon and browsing.
-
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.
-
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.
-
Click Next.
-
Specify the New filename with variables or by selecting the folder icon and browsing.
-
Specify what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.
Delete
-
Specify the File(s) to delete with variables or by selecting the folder icon and browsing.
-
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?.
-
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.
-
Click Finish.
Concatenate
-
Specify the Source path for file A and file B with variables or by selecting the folder icon and browsing.
-
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.
-
Click Next.
-
Specify the Concatenated file path with variables or by selecting the folder icon and browsing.
-
Specify what to do about a Matching filename (Append, Skip, Numerate, Overwrite, Fail), then click Finish.
Checksum
-
Specify the Source path with variables or by selecting the folder icon and browsing.
-
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.
-
Click Next.
-
Specify the Destination path with variables or by selecting the folder icon and browsing.
-
Specify the Checkusm algorithm (CRC32, MD5, SHA1, SHA256, SHA384, SHA512) and then click Finish.