FTP Connector Guide > FTP Event Targets > Event Target File Properties
  

Event Target File Properties

The following table describes the file location properties:
Property
Description
Directory
Required. Specify the relative path of the directory where you want to store files.
For example: data/docs
The question mark (?) is a prohibited character in this field.
If you use an FTP or SFTP connection, always specify a path that is relative to your FTP or SFTP home directory on the FTP or SFTP server. You can find out the home directory by accessing the FTP or SFTP endpoint through a GUI client. The home directory is the first directory that you are connected to when you access an FTP or SFTP endpoint.
For example, consider the following directory structure where raj is the home directory:
The image shows a sample directory structure.
If you want to point to the data directory, you must specify the relative path in the Directory field as follows:
../../usr/data
FTP Connector navigates two directories back from the raj directory to the root directory and then navigates to the usr directory followed by the data directory.
Note: Processes can create only nested folders.
File Exists
Required.
Determines what to do if a file already exists with the same name:
  • - Override (the default) to replace the existing file. Also select an Eager Delete option to determine how to handle existing files when the targets are generated.
  • - Append to add content to the existing file. Do not specify a Temp Prefix or Temp File Name.
  • - Fail to skip the conflicting file and throw an exception to indicate that the file name already exists.
  • - Ignore to skip the conflicting file and silently ignore the problem (no exception thrown).
  • - Move to move any existing files before writing the target file. Use with Move Existing to specify the folder where you want to move existing files.
  • - Try Rename to rename the file from the temporary name to the actual name without checking to see if the file name exists. Use only if you also specify Temp File Name. This might be faster on some file systems or FTP servers.
Move Existing
Use with the File Exists "Move" option to specify a file location for existing files when writing the target.
Simply enter "backup" in this field to move existing files to the backup folder. To rename the backup files as they are moved, so subsequent operations do not replace backup files with a newer version, you can enter an expression to determine the file name. For example:
backup\${file:name}_${file:modified}
This expression creates a new file in the backup folder every time existing files are moved and appends the timestamp to the file name.
For more information on using the Apache Camel File Expression language, see:
Eager Delete
Select Yes to delete the target file before the temp file is written. In that case, you must also select Override as the File Exists option and specify a Temp File Name (see below).
Select No to wait and delete the target file only when the temp file is ready to be written and renamed to the output file name. You might want to use this if you want to ensure that the existing file is available during the time interval it takes for the write operation to complete.
The following table describes the file writing properties:
Property
Description
Temp Prefix
Enter a prefix for the file name if you want to write the file to a temporary name and, after the write operation completes, rename it to the original name.
Note: Ignored if you select Append as the File Exists option.
Temp File Name
Enter an expression to determine the file name for temporary files, instead of a prefix. You can take advantage of the Apache Camel File Expression language.
Note: Ignored if you select Append as the File Exists option.
Force Writes
Select Yes to force the file system to write all the data to a target file, to make sure that in the event of a system failure, all data is retained.
Select No if you work, for example, with log data and are not concerned with loss of a data fragment in the event of a file system failure. This might yield a small performance improvement.
Write Buffer Size
Determines the size of the write buffer (in bytes).
Default: 128kb.
Character Set
Required. Determines the encoding of the file
If not specified, the Event Target uses UTF-8 file encoding.