The adapter has features that allow you to execute desired actions directly before or after the actual file transfer. You can enter these settings at the adapter configuration parameters or in the Configuration node of the desired OTD.
These features are available with both the BatchLocalFile OTD and the BatchFTP OTD.
For an inbound transfer, the file can be made unavailable to other clients polling the target system with the same directory and file pattern or name (Rename). For an outbound transfer, you can perform an automatic backup of the existing file (Copy).
Your pre-transfer options are:
Rename: Rename the target file for protection or recovery; you must provide a desired directory and file name. The directory is created if it does not already exist.
Copy: Copy the target file for backup or recovery; you must enter a desired directory and file name.
None: Do nothing.
Each FTP server can behave differently when you are using Rename and a destination file already exists. For example, for some UNIX FTP servers, the destination file is overwritten without question. That is, no error or warning message is given. On other FTP servers, a Windows XP server for example, the system generates an error that results in exceptions being thrown in the called OTD method.Be sure you are familiar with the native behavior of the corresponding FTP server. If you are in doubt, try the action at the command prompt. If the action displays an error message, it is likely to result in the throwing of an exception in the Collaboration.
To gain proper protection, backup, or recovery, you must choose the appropriate setting that serves your purpose. For example, to recover from failures on an outbound appending transfer, use the Copy setting. When specifying file and directory names you can use regular expressions, special characters, or both.
For an inbound transfer, you can mark the transferred file as “consumed” by making an automatic backup (Rename) or by destroying it permanently (Delete). For an outbound transfer, you can make the transferred file available to other clients by renaming it. When specifying file and directory names you can use regular expressions, special characters, or both.
Your post-transfer options are:
Rename: Rename the transferred file; you must provide a desired directory and file name.
Delete: Delete the transferred file (inbound transfers only).
None: Do nothing.
For an outbound transfer (publishing), the directory is created if it does not already exist.
For more information on Pre and Post Transfer commands see the following:
BatchFTP OTD
BatchLocalFile OTD