Define server type
This dialog box allows you to configure servers which aren't recognized by Total Commander's autodetect function. This can happen because the file list returned by FTP servers isn't standardized. Most servers on the Internet use Unix-style (ls -l) listings, but many mainframes and Intranet servers use their own proprietary format.
Definition string: The string which you can define here will be used for parsing the raw server listing shown in the field below. The string uses special characters for each field type, e.g. 'n' for the file name. See below for a definition of all field types.
Raw directory data from the server:
This is the listing returned by the FTP server for the current remote directory. If this directory doesn't contain any useful files, you should disconnect, and use Net - FTP Connect to define a different remote directory.
When you connect through a HTTP proxy, the listing is preprocessed to remove HTML tags and other data which makes parsing of the listing difficult.
Additional definition strings (optional, for very complex servers):
If the server returns very different strings, e.g. one for files and a different one for directories, you can define more than one definition string. Total Commander will use the string which returns the least errors.
Interpreted data for selected line of raw data:
This section allows you to verify that your definition string works as it should. After defining a string, you should place the cursor on all lines in the raw listing to make sure that all data lines return valid data.
Load existing type...
If you already have defined a special server type, you can load its definition string(s) here. You can also import server types defined by others. This allows system administrators to offer a predefined template file for the company server(s). To create such a file, define a server with this dialog box, and then copy the server definition from wcx_ftp.ini to a separate ini file. You can then make it available to all other users.
OK Associates the current connection with the defined server type. If you have modified the definition string, you will be asked to save the new server definition.
Cancel Closes the dialog box without saving. Total Commander will then use 'automatic' mode.
List of definition characters (upper/lowercase is important!):
Name-specific characters:
n File name (nnnnnnnn means 8 letter file name, n* see definition of * below)
v VMS style file name: name.ext;1 or dirname.dir;1
. (a dot) Remove trailing spaces from file name and append further characters separated by a dot (e.g. nnnnnnnn.nnn), see PC-NFSD sample below.
Characters for date and time:
D Day
M Month
TTT Three letter month name (Jan, Feb, Mar, ...), supports English, German and French.
TTT=12 month names with 3 letters each
Allows the definition of foreign language month names. Example (polish):
TTT=stylutmarkwimajczelipsiewrzpa„lisgru
UUUUU Unix-style year/time mix, e.g. either "2000 " or "20:30" in the same place
Y Year
h Hours
H Hours modifier letter (a - a.m. time, p - p.m. time)
m Minutes
s Seconds
Characters for other file attributes:
S Size
S=1024 Size multiplied with given value (here: 1024). Useful for servers which return the size in blocks.
p Unix style permissions (e.g. -rwxrwxrwx, defines user rights)
d dir flag, defines a directory if this char is D or d, e.g. part of text <DIR> or [DIR]
d=x dir flag, the char defining a directory is given behind the = (see VOS sample below)
Misc. characters:
* 1. After any numeric field: use all digits up to first non-digit character
2. For name field not at line end: use all chars up to next space
3. For name field at line end: use all chars until the end of the line
! Skip all characters until first space or end of line
$ Skip all spaces/tabstops until next character or end of line
\ Data continues on next line (max. 2 lines supported)
<space> Ignore character. Must not be at the beginning of a line, because Windows would delete all leading spaces!
- (dash) Ignore character. Use this at the beginning of a line instead of a space.
x Exaclty 1 space. If there is a different character at this position, ignore the whole line (e.g. to ignore lines above or below the file listing, which show the free disk space etc).
Sample definition strings:
1. AIX Unix server:
Sample listing:
-rw-rw-r-- 1 dso posgroup 2913 Mar 25 1999 .Xdefaults
drw-rw-r-- 1 dso posgroup 2913 Mar 25 13:30 subdir1
Definition string:
pppppppppp SSSSSSS TTT DD UUUUU n*
Or better:
pppppppppp !S* TTT DD UUUUU n*
Notes: The second definition is better because the owner and group names may be longer, moving the size string to the right.
2. PC-NFSD:
Sample listing:
prog1 exe 2,563,136 06-10-99 10:00a
temp <dir> 01-27-97 3:41p
Definition string:
nnnnnnnn.nnn dSSSSSSSSSSS MM DD YY hh mmH
Notes: The commas in numeric fields are detected automatically. This string gives an error of 1 for all directories because there is no size field, but errors up to 2 are ignored by Total Commander if there is no second definition string - otherwise the string giving the smaller error is used. The dot in the definition string removes the spaces in the name between prog1 and exe, and inserts a dot.
3. VOS (Stratus):
Sample listing:
w 10 seq 99-04-20 11:15:42 abbreviations
m 4 99-07-02 10:11:25 arsffs32
Definition strings:
- SSSSS YY MM DD hh mm ss n*
- d= SSSSS YY MM DD hh mm ss n*
Notes: This server has different lines for files and folders, so it needs 2 definition strings.
4. Unisys Clearpath:
Sample listing:
UCF/CONFIG/SAMPLE/TSA SEQDATA 1428 09/22/1998 18:37
FF990628/BD/0009942/0009943/000PRINT
BACKUPPRINTER 7200 01/01/2000 04:22
Definition strings:
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn SSSSSSSSS MM DD YYYY hh mm
n*\x SSSSSSSSS MM DD YYYY hh mm
Notes: This is an example of a server wrapping to 2 lines if file name becomes too long, so it needs 2 definition strings.