Admin Production ni-theme
Current Publication

Using the FTP Client Capabilities

LabWindows/CVI

Using the FTP Client Capabilities

The File Transfer Protocol (FTP) is one of the TCP/IP protocols for data transmission on the Internet and is used mainly to transfer files between computers. The FTP protocol is a client–server protocol in which an FTP server waits for FTP clients to connect to the server and issue requests.

The LabWindows/CVI Internet Library does not provide functions that let a program behave as an FTP server.

When a program calls the FTP client functions, it connects to an FTP server that typically is running on a remote computer.

Note  The remote computer must be running an FTP server on the standard FTP server port (21).

Generally, FTP servers require clients to provide a user name and password before processing any requests. An FTP server administrator determines the user access policy for the server. Many FTP servers allow anonymous access, with restrictions, to the server. To log on to an FTP server anonymously, clients enter anonymous as the user name and their email address as the password.

The LabWindows/CVI Internet Library provides FTP client functions that let a program connect to and perform operations on a specified FTP server. These functions include InetFTPAutoSend and InetFTPAutoRetrieve, two high–level functions that simplify sending files to and retrieving files from an FTP server. These high–level functions log on to an FTP server, send or retrieve a file, and then log out of the FTP server. Refer to Using High-Level Versus Low-Level FTP Functions for data transfer examples that demonstrate how to use high–level and low–level FTP functions.

Note  If an FTP-client application is run from behind a firewall, use the passive, or client–initiated, mode of establishing an FTP data connection. After opening an FTP connection, call the low–level InetFTPSetPassiveMode function to set the data connection mode to passive mode.

Both the high–level and low–level FTP client functions allow you to specify whether to transfer files in binary or text format. Binary files are transferred without any modifications. Text files are translated during the transfer so that the receiving system stores the files in its default text format.