A template specifies the contents of the fields in a control line concerning a file or folder, sent by a host that is running an FTP server of a given type.

Example of Template for Windows NT

The template for the Windows NT host type is:

WinNT=%2d %s %n

This tells the FTP Client:

  • The path separator is backslash ().
  • There are two date/time fields, followed by:
  • The file size field. This field is followed by:
  • The file or folder name field.

There is no permission data.

The following lines show some file and folder information received from a Windows NT workstation in this format:

01-19-94  06:26PM       <DIR>          GCP
03-08-93  01:39PM               203776 GCP.EXE
02-20-93  10:34AM                10979 GCP.H
03-03-93  08:29PM                70002 GCP.HLP
09-14-93  12:13PM               283043 GCP.ZIP

Since Windows NT has similar file and folder information to DOS, any folders will have the string <DIR> instead of the file size. This allows Distinct FTP Client to recognize a folder or subfolder.

The Distinct FTP Client uses the Windows NT template to interpret the transmitted information, and will display  the folder and file list for folder GCP (with long format and lower case local display) as follows:

How to Add a Template Definition (Windows 95)

In Windows 95, the template definition must go into the Registry. To add a template definition, follow these steps:


Click on Start and Run regedit.


Find the HKEY_LOCAL_MACHINESOFTWAREDistinctAPPSFTP32 key and open it.


Use Edit, New, String Value to add an entry with Value name Templates, and type in your host type name, an equal sign, and the pattern of file information fields as its Value data.



Quit the Registry.

If necessary, you can later select the Templates entry and use Edit, Modify to change the Value data.

Template Definition Rules

  • A template definition must be on one line, and must comprise a host type name set equal to the pattern of file information transmitted, preceded by an optional path separator character.
  • The path separator character can be any single character. The default value if no path separator is present is slash (/), as in Unix.
  • Host type names are arbitrary and can contain spaces, but they must be different from any host type already included in the Host Type list box on the Connect to Host dialog box.
  • The pattern can include any number of elements made up as follows:

%[1...9]p | d | s | n | i

where each letter refers to a specific file information field as explained in the following table.

Field Code

Field Name




Who can use a file or folder and how they can use it. There are three possible permissions: read, write, and execute, for three sets of people: owner, group and world, (for example -rw-r—r—).


Date or Time

The date or time or both (for example Sep 14 11:40). Usually there is more than one date/time field as spaces within information mean separate fields.



The file size in bytes.



The filename (for example STATS.ZIP).



Remote system  information that Distinct FTP Client does not display (for example user name, department). Such fields are ignored.

  • Fields can be separated by spaces or tabs or both; no spaces are allowed within a field.
  • Each letter (p, d, s, n, i) must be preceded by the percent sign (%) which may be followed by an optional repeat count from 1 to 9. The repeat count indicates how many times the field appears. This number is normally used for date and time fields, or for fields to be ignored.
  • You can put the same field more than once. For instance, %d %i %d and %2d both specify two date/time fields, such as 01-08-93 and 06:12PM. In the first case, the date/time fields have unwanted information between them.
  • After the fields, you can put up to 3 “exclude strings”. An exclude string is a string preceded by a comma. Any line from the remote host that starts with the string (leading spaces are skipped) will not be used by Distinct FTP Client when it builds the folder tree and file list.

Exclude strings are most commonly used to exclude summary information. For example, the template below tells Distinct FTP Client that when it is connected to a Microware OS/9 host type, any line beginning with Owner or 3 dashes should be ignored.

Microware OS/9= %i %2d %p %i %s %n,Owner,———-

  • For a host type with UNIX-style file and folder information, do not specify the letter d as an exclude string ( “,d”). You risk excluding all lines relating to folders and subdirectories.

How Folders are Recognized

There is no template field to indicate subdirectories. Distinct FTP Client recognizes folders automatically if they use the UNIX or DOS standard structure for folder information, as explained in the following table.

Control Information


Directory Recognition


Permission (%p)

Starts with d


Size (%s)

<DIR> instead of number

  • For UNIX, you must include a permission field (%p), and for DOS, you must include a size field (%s). Otherwise, all folders and subfolders will be listed as files.


Distinct Intelliterm
the Most Complete Terminal Emulator for TN3270, TN5250 and DEC VT220 to VT420
Now also TN3270 and TN5250 over TLS/SSL

Browse FAQ

Do not forget to check out:

Terminal Emulation Automation features
Screen scraping software for terminal emulation
PC-to-host integration samples
Legacy Applications Integration

Download 30-day Trial of
IntelliTerm, TN3270 & TN5250 emulator

06/23/2017   Legal notices | PRIVACY Policy |