NextGen Knowledge Center

File Reader

This source connector reads files from a local or remote directory on a specified interval/time schedule. Several protocols are supported, including regular local file mode, FTP, SFTP, SMB, WebDAV, and Amazon S3. Files may be read in and converted to Base64, or converted to a message string using a specific character set encoding. After reading in files, the connector has options to either delete the original files, rename them, or move them to a separate directory. Additional options (like FTPS) are available with the SSL Manager extension.

Supported property groups:

ItemNameDefault ValueDescription
AMethodfileThe basic method used to access files to be read in. Options include File (local filesystem or NFS / mapped share), FTP, SFTP, SMB, WebDAV, or Amazon S3. Once all necessary connection/directory information has been filled in before, use the Test Read button to attempt to actually connect and test the ability to read from the directory.
BAdvanced Options 

If the file method supports advanced options, this button will be enabled. Advanced options are summarized in the Advanced Options label.

For additional information, see:

CDirectory Only applicable to the File method. The directory (folder) in which the files to be read can be found.
DURL 

Applicable to all methods except File. The domain name or IP address of the host (computer) on which the files to be read can be found. If this setting is enabled, the second text field specifies the directory (folder) to read from.

When using the Amazon S3 method, the first text field will be the bucket name, and the second text field can be used for a directory prefix.

EFilename Filter Pattern*Files with names that do not match this pattern will be ignored. If Regular Expression is disabled, regular wildcard (*) matching is supported.
FInclude All SubdirectoriesNoSelect Yes to traverse directories recursively and search for files in each one.
GIgnore . filesYesSelect Yes to ignore all files starting with a period.
HAnonymousYesOnly applicable to the FTP / WebDAV / Amazon S3 methods. If enabled, connects to the remote server anonymously instead of using a username and password.
IUsernameanonymous

Applicable to all methods except File. The username used to connect to the remote server with.

When using the Amazon S3 mode, this will be your AWS Access Key ID.

JPassword 

Applicable to all methods except File. The password used to connect to the remote server with.

When using the Amazon S3 mode, this will be your AWS Secret Access Key.

KTimeout (ms)10000Applicable to the FTP / SFTP / SMB / Amazon S3 methods. The socket timeout (in ms) to use when connecting to the remote server.
LSecure ModeYesOnly applicable to the WebDAV method. If enabled, HTTPS will be used instead of HTTP.
MPassive ModeYesOnly applicable to the FTP method. If enabled, the server decides what port the client should connect to for the data channel. Passive mode sometimes allows a connection through a firewall that normal mode does not, because the client is initiating the data connection rather than the server.
NValidate ConnectionYesOnly applicable to the FTP method. If enabled, the connection will be tested for validity before each operation.
OAfter Processing ActionNoneSelect Move to move and/or rename the file after successful processing. Select Delete to delete the file after successful processing.
PMove-to Directory If successfully processed files should be moved to a different directory (folder), enter that directory here. The directory name specified may include template substitutions from the list to the right. If this field is left empty, successfully processed files will not be moved to a different directory.
QMove-to File Name If successfully processed files should be renamed, enter the new name here. The filename specified may include template substitutions from the list to the right. If this field is left empty, successfully processed files will not be renamed.
RError Reading ActionNoneSelect Move to move and/or rename files that have failed to be read in (for example, if an out-of-memory error occurs, or the network connection drops). Select Delete to delete files that have failed to be read in.
SError in Response ActionAfter Processing ActionSelect Move to move and/or rename the file if an ERROR response is returned. This action is triggered when the Response selected in the Source Settings has a status of ERROR. If After Processing Action is selected, the After Processing Action will apply. This action is only available if Process Batch is disabled in the Source Settings.
TError Move-to Directory If files which cause processing errors should be moved to a different directory (folder), enter that directory here. This action is triggered when the Response selected in the Source Settings has a status of ERROR. The directory name specified may include template substitutions from the list to the right. If this field is left empty, files which cause processing errors will not be moved to a different directory.
UError Move-to File Name If files which cause processing errors should be renamed, enter that directory here. This action is triggered when the Response selected in the Source Settings has a status of ERROR. The filename specified may include template substitutions from the list to the right. If this field is left empty, files which cause processing errors will not be renamed.
VMove-to Variables 

The variables listed here can be dragged-and-dropped into the Move-to fields to the left.

  • channelName: The name of the current channel.
  • channelId: The unique ID of the current channel.
  • DATE: The current date, formatted as a human-readable string.
  • COUNT: A numeric count that increases for each file read in, from the point when the channel was last deployed.
  • UUID: An auto-generated universally unique identifier.
  • SYSTIME: The current epoch time in milliseconds.
  • originalFilename: The name of the file that was read in. Use this to easily add on an extra file extension to the original name.
WCheck File AgeYesSelect Yes to skip files that are created within the specified age below.
XFile Age (ms)1000If Check File Age is enabled, only the files with creation dates older than the specified value in milliseconds will be processed.
YFile Size (bytes)0, Ignore MaximumThe minimum and maximum size (in bytes) of files to be accepted. If Ignore Maximum is checked, the file size will only be bound by the minimum value.
ZSort Files ByDateSelects the order in which files should be processed, if there are multiple files available. Files can be processed by Date (oldest last-modification date first), Size (smallest first), or Name (a before z, etc.).
AAFile TypeTextSelect Binary if files contain binary data; the contents will be Base64 encoded before processing. Select Text if files contain textual data; the contents will be encoded using the specified character set encoding.
BBEncodingDefaultIf Text is chosen for the File Type, select the character set encoding ( ASCII, UTF-8, etc.) to be used in reading the contents of each file.
File Reader