To download a file, you call InetFile. InetFile downloads a file from the FTP server and stores it as some file on your local drive. Therefore, you supply the name of the FTP file on the server, and also supply what filename you want to use when the file is stored on your local drive.

The first arg is the name of the file on the FTP server. Rather than specifying a full pathname, you should set the FTP's current directory to where the file is located, and then pass only the filename part to InetFile. This is because some FTP servers do not support specifying full path names.

The second arg is what filename you want to use when the file is stored on your local drive. This can include a full path to store the file in a particular directory.

The third arg controls the type of transfer. If you omit this arg, you get the default behavior. (InetFile checks if there is already a local file with the desired name, including in the local cache. If no such file, or if it is older than the server's file, then InetFile downloads the file, overwriting any existing file. No translation of end of line characters is done).

The fourth arg is the attributes for the file stored on your hard drive. You can omit this arg to have the default attributes.

/* Download the file README.TXT from the current directory and save
 * it on the local drive as "README.TXT" in the temp directory. Assume
 * it's a text file and perform end of line translations
 */
err = InetFile("README.TXT", SEARCHPATH("%TEMP%") || "README.TXT",  "TEXT")
IF err \== "" THEN SAY err
If you omit the second arg, then InetFile uses the same name as the file on the server, and downloads to the current directory on your hard drive.
/* Download the file README.TXT to the current directory */
err = InetFile("README.TXT", , "TEXT")
IF err \== "" THEN SAY err