List Format Options
If Server Type is FTP: Allows you to add statements to the FTP script that control the format of the file list returned by the FTP task. The Agent depends on the file list being in Unix "long" format (that is, what you would see if you entered "ls -l" from the command shell) in order to correctly and reliably parse out file name and size (when a Stable period is specified). If the FTP Server is configured to return a different format, the Server may support commands that alter the format.
For example, the following statements may be used for an FTP File Monitor task executing against an IBM iSeries (AS/400) FTP Server to ensure a correctly-formatted file list:
If the FTP File Monitor task is executing against a Microsoft FTP Server and that Server is configured to return a file list in DOS format, the following statement will toggle the format to a Unix-style listing.
Not all FTP client/server implementations provide statements that can alter the format of the ls command, which the FTP File Monitor task issues to generate the file listing. However, those implementations may support the dir command, which can return the file list in the correct format. If the dir command is specified in the List Format Options field, the FTP File Monitor task will use the results from that command to obtain the file sizes. In such cases, the FTP script will contain the dir and ls commands, but since statements in the List Format Options field are inserted into the script prior the ls command, the results from the dir command are parsed first.
If the dir command is necessary to obtain the correct file list format, simply specify that command along with the same value specified in the Remote Filename field. For example, if Remote Filename is /uagtests/data/somefile*.txt
, enter the following in this field:
This statement also can be used with other commands to get the correct output. For example, if a Windows FTP Server is configured to return file lists in Windows format, use site and dir commands together in this field:
Invalid statements or valid statements that do not control the file list format are ignored.