FTP Server Type Template Keys

Reference:        Manage FTP Server Types

These keys insert the corresponding template keywords at the current cursor position.  Each keyword includes the most common terminating character, which is usually a blank.  The OR keyword separates “sub-templates”.  You may create any number of sub-templates, which are applied to the data sequentially.  If any sub-template matches, the resulting data is returned.  This allows for differing formats.  Coupled with the variable line feature, the sub-templates provide a way to specify dynamic data interpretation.

ATTR

Unix file attributes in the drwxrwxrwx format.

ATTR(<dir>)

The attributes of the file, where the presence of the <dir> string signifies this is a directory.

NAME

The name of the file or directory.

NAME(<suffix>)

The name of the file or directory, where the suffix is used to indicate directories.  This is true of some Madgoat FTP servers, where the suffix .DIR appears on directories.

SIZEX<number>

The size of the file in <number>-sized blocks, where <number> defaults to 512.

SIZE

The size of the file in bytes.  The final size is the product of all occurrences of SIZE and SIZEX.

AMONTH

The three character abbreviation for the name of the month.  Longer names are accepted.

MONTH

Month

DAY

Day

YEAR

Year.  Two-digit years are adjusted appropriately.

YEAR(<offset>)

Year with offset.  The offset is added (+) or subtracted (-).

HOUR

Hour

MINUTE

Minute

SECOND

Second

DON’T CARE

Skips the field.

OR

Start of the next template.  Inserts a return.

 

The <offset> for the YEAR() command is used to adjust the display for ftp servers that do not properly return the year.

The size of any of the above fields can be limited by appending a colon and the maximum length to the field identifier.  This is useful for those displays where the formatting allows fields to run together, making it impossible to reliably determine a terminating character.  For example, if the size field cannot exceed 10 characters, you might include the keyword:

            SIZE:10

in your template.  The terminating character still follows the complete keyword, in this case a blank.  Be sure the terminating character appears AFTER the size limit.  For example, a limited hour keyword might be:

            HOUR:2:

where the first colon denotes the limit and the second denotes the actual terminating character.

Note:  The keyword is placed into the template at the current cursor position.  You may move information around in the template by using the copy and paste keys Ctrl-C, Ctrl-V, and Ctrl-X.  You may also edit the template directly.