Previous Topic

Next Topic

Book Contents

Book Index

Autodetect

The autodetect statement examines the last reply from the server to help determine the host type of the FTP server to which it is connected. Autodetect expects to examine the welcome banner so the statement should be placed immediately after the welcome banner is returned. Here are two example banners returned from two popular FTP servers. Autodetect would detect the first as being a Microsoft NT server, and the second as being an Progress WS_FTP server.

220 tstsrvnt Microsoft FTP Service (Version 3.0).

220 tstsrvws X2 WS_FTP Server 1.0.5 (1737223651)

If connection was made directly to the host FTP server and the welcome banner was already returned before the script begins execution, then autodetect should be the first statement in the script. If the connection was made to the firewall and the welcome banner from the host FTP server becomes available later in the script, the autodetect statement should be placed at that point. If the firewall swallows or replaces the welcome banner from the FTP host, or for some other reason, the FTP client never sees the welcome banner, then leave out the autodetect statement. Progress WS_FTP Professional will try to determine the host type after the script executes.

Autodetect does nothing if the host type in the site profile is set to anything other than 'Auto Detect.' The autodetect statement has no return value and does not change the flow of the script.

See Also

FireScript Statements

Switch Statements

Case Statements

Examples of Case Statements

Continue

Jumps and Labels

Return