Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Managing File Transfers with ActiveTransfer | Administering ActiveTransfer with Command Central | Managing Actions | Task Configuration Definitions | Write Content Task Configuration
 
Write Content Task Configuration
You can configure the following properties for the Write content file operation task:
Field
Description
Task name
Type a unique name for the task.
File filter
Type the name of the file if you want to filter files with specific names. By default, ActiveTransfer Server considers all files. If you want to use regular expression, specify a valid regular expression in File filter and select Use regular expression option.
Note:
You can use wildcard characters to filter the file names. For example, type *.zip to trigger the action only when ZIP files are uploaded or downloaded. To trigger an action based on a name string in the ZIP files, use the name string in the File filter box, preceded and followed by wildcard characters. For example, type *invoice*.zip to trigger the action based on the file URLs, when ZIP files containing the character string invoice in their file names are uploaded or downloaded. If you define a File filter for a task, the task acts only on files that are filtered out.
Few examples for regular expressions are:
*(.(?!purchaseorder))*: Excludes files with the file URL containing purchaseorder.
**/out/.*: Include files with the file URL containing the folder out.
*^abc(.*)123$: Includes anything that starts with abc and ends with 123. Matches abc123, abcxyz123, but not abcxyz123def.
*NEW-((*.doc)|(*_backup_*)): Includes anything starting with NEW- that either ends in .doc, or is followed by the string _backup_.
File path
Type the path containing the file to write to.
Overwrite file contents
Select this option if the file already exists and you want to replace the entire contents of the existing file with new content.
Contents if file does not exist
Type or paste the content to write to the file if the file does not exist.
Add before
Select this option to insert new content before existing content in the file and do the following:
*If you want to insert the content at the beginning of the file, select Beginning of file and then type or paste the new content in the Contents box.
*If you want to insert the content before a specific string of existing content in the file, select Find, type the string in the box beneath this option, and then type or paste the new content in the Contents box.
Add after
Select this option to insert new content after existing content in the file and do the following:
*If you want to insert the content at the end of the file, select End of file and then type or paste the new content in the Contents box.
*If you want to insert the content after a specific string of existing content in the file, select Find, type the string in the box beneath this option, and then type or paste the new content in the Contents box.
Execute error task
Select this option to execute an error task if the file operation fails. For more details, see Error Task Configuration.
The write content task adds the specified information about the list of files to an existing file in File path or to a new file created for this purpose. After the successful execution of the task, the list of files from the previous task is passed on to the subsequent task. The file created or modified by this task is not passed on to the next task.
Example: An action configured with the following task:
1. Find task: Find files in Source location = <source folder>
2. Write content task: Writes information regarding the files in a specified file.
3. Move task: Moves the files to the Destination location = <destination folder>
The action results in the following:
1. Find task lists all the files in the <source folder>.
2. Write content task writes information on the files passed on to it by the find task. For example, the task could write the file names of all the files passed on to it to a <file.ext> file specified in the task.
3. Move task moves the files that are encrypted by the encrypt task to the <destination folder>.