ANT Internet Suite - Chapter 8

back to Contents

FTPclient

8.1 About FTP

FTP is a protocol (File Transfer Protocol) for transferring software files between remote computers. Using the FTPClient, you can transfer files to and from computers around the world.

FTP is often used to distribute:

Anonymous FTP

In most cases you will be using what is known as Anonymous FTP. This means that you do not have to have an account, or be known to, the host computer. You can simply connect and take a copy of any of the files to which you have been given access.

8.2 Using FTP

To use FTP you need to know the FTP location of the file you want to download. You can use the Archie utility to locate files if you don't know their address, or a Web search engine.

FTP addresses take the form of URLs starting ftp://.

Files for public access are usually stored in the directory /pub on FTP servers.

Files are usually stored on FTP servers in a variety of compressed formats to save time when downloading. Some of these are machine specific. Some compression formats are self-extracting, and do not need a decompression program, while others require the use of a specific decompression utility.

8.3 Loading the FTPclient

To load the FTP client ready for use:

  1. Double-click on the File transfer icon in the Internet Suite panel.
  2. The FTP client icon will be loaded on the right hand side of the icon bar.

8.4 Opening an FTP connection

To connect to a known FTP server.

  1. Click Select on the FTP client icon on the icon bar.
    The Open FTP connection dialogue will appear:
  2. If you have any FTP Hotlist entries you can display and choose them by displaying the pop-up menu and clicking on the entry you want, then clicking Connect.
  3. Type in the FTP address you want in the Server box, for example:
    ftp.demon.net
  4. If you know the name of the directory you want to find and its full path, type that into the Directory box, for example:
    pub/dci4
  5. For named FTP sessions you should type your account name in the User box. For anonymous FTP sessions you should type:
    anonymous
    Entering anonymous in the user field will automatically enter an email address in the password field for you.
  6. Type your password in the Password box (usually your email address for anonymous sessions).
  7. Click Connect.
    The FTP client will open a window and attempt to connect to the requested server. To see the status messages produced by the FTP client, choose Commands from the Display menu inside the FTP window. Some sites use this area to display copyright messages and other useful information.
  8. The contents of the FTP site will be shown in a filer window, with the FTP address as its title:
  9. To move from directory to directory, double-click the folder icons to open windows as you would directories on your hard disc.

To go back a level, choose Open parent from the FTP menu.

Closing a connection

To close an FTP connection:

  1. Choose Disconnect from the FTP menu.
  2. A warning dialogue will appear asking if you want to complete any file transfers in progress before disconnecting.
  3. Choose Transfer to complete any outstanding transfers, Disconnect to disconnect now and abandon the transfers, or Cancel to close the dialogue and keep the connection open.

If you close all windows relating to the FTP connection, a warning box will appear telling you that the connection will be closed.

8.5 Adding servers to the Hotlist

You can add any server or directory on a server to your Hotlist.

To do this:

  1. Connect to the server in the usual way.
  2. Navigate to the directory you wish to store in the Hotlist.
  3. Click Menu in the required window and display the Hotlist menu.
  4. Choose Add site.
  5. The new entry will be added to the Hotlist, and next time you display the Open connection dialogue box you will be able to choose it from the pop-up menu.

8.6 Transferring files

File transfer with the FTP client is as simple as dragging files from one window on your desktop to another.

Once you have reached an FTP site, you can open and close directories within it just as you would on your own desktop, until you locate the file you want to download or the place you want to upload your files.

Downloading files

To download a file:

  1. Drag its icon from the FTP filer window to the directory on the local disc in which you wish to store the file.
  2. A window will appear giving details of the progress made by the transfer and giving you the option to quit if you want (for example if a large file is transferring very slowly):
  3. When the download is completed, the downloaded file's complete icon will be displayed in the filer window to which you dragged it.

Copying files

You can also download a file by copying it. This is useful if the existing name of the file is illegal in RISC OS, or if downloading it would truncate it. To copy a file:

  1. Select the file you want to copy.
  2. Choose Copy from the File menu.
  3. Type the new name into the Copy as dialogue box.
  4. Drag the file icon to the directory window where you want to save it.
  5. The file will be downloaded and saved under the new name.

Uploading files

To upload files, simply drag their file icons from a filer window on your desktop into the FTP site's filer window.

Note that there are usually restrictions about where on a site you can upload files, and access is usually restricted to an `incoming' or `public' directory. You can tell that you will be able to place a file there because the second column of the FTP filer window will contain a W indicating that you have permission to write to it.

To upload a file:

  1. Open the filer window containing the file.
  2. Open the FTP connection to the required site and open the directory to which you are uploading the file.
  3. Drag the file icon into the required FTP filer window.
  4. A dialogue box will report on progress, or let you know if the file cannot be uploaded because you do not have permission.
  5. When the transfer is complete, the uploaded file's icon will be displayed in the directory.

Transferring several files at once

You may have several FTP connections and file transfer operations going on at once.

If this is the case, you can see how each operation is progressing by viewing the queue.

To view the queue:

  1. Click Menu on the FTP client icon. 
  2. Choose Show Queue from the FTP menu.
  3. A dialogue will appear displaying details of files in transfer or waiting to be transferred:
  4. To manage the transfer of a file, click Menu over its entry. A menu will appear, allowing you to hold or release the file, set a time for the transfer, rename the file, or delete it from the queue.

Delaying a download

Use the Hold and Release options in the File transfer queue window to delay downloads.

  1. Click Menu over the queue entry whose download you wish to delay.
  2. Choose Hold from the FTP menu.
  3. The download of that item will be delayed until you choose Release. The status entry will change to show Held rather than Active or Waiting.

Setting a download time

To set a download time:

  1. Show the FTP queue by choosing Show queue from the FTPclient icon bar menu.
  2. Click Menu over the entry you want to set the time for.
  3. Choose Timer from the FTP menu.
  4. The Timed dialogue box is displayed:
  5. Use the arrow buttons to increase or decrease the time in hours and minutes.
  6. Use the arrow buttons to set the date.
  7. Click OK.

Transfer types

You can choose how to transfer files to and from FTP sites. The choices are:

As a general rule, unless you experience any problems with a particular file, you should leave this setting as Auto selection. If you are attempting to upload files to a server which cannot detect file formats automatically, you will need to specify the correct type.

8.7 Working with files and directories

You can use FTPclient to perform some tasks on the server such as creating directories, and renaming and moving files.

Creating directories

To create a new directory on the server:

  1. Connect to the server.
  2. Display the directory in which you wish to create the new directory.
  3. Click Menu and choose New directory.
  4. Type in the name of the new directory.

Renaming files and directories

To rename a file or directory:

  1. Click on the file or directory name to select it.
  2. Click Menu and choose the File or Directory option, which will include the name of the selected object.
  3. Choose Rename from the File menu.
  4. Type in the new name.

Sending FTP commands

If you know how to control an FTP session from the command line you can send commands directly. To do this:

  1. Open the connection as usual.
  2. Choose Display from the FTP menu.
  3. Choose Commands.
  4. A window will be opened with the current URL as its name:
    A logging section includes all the commands which have so far been sent in this session.
    At the bottom is a command line.
  5. To send an FTP command, type it into the Command box and then click Send.

8.8 Troubleshooting

Once you have the correct address and attempt to download files using the correct transfer types, you are unlikely to experience problems with FTP downloads.

Slow downloads or unable to connect

If a download is slower than you expect or usually achieve at that site, try connecting at a less busy time. Busy servers often allow only so many users to connect at once and you may have to try several times to get on to a busy site. Try to find a `mirror' copy of the site you want to access hosted on a more local computer system.

Files compressed using an unrecognisable format

A wide range of compression programs are in use on the Internet and not all are supported by software available for Acorn computers. SparkFS offers a wide range of formats. Remember that Mac and PC application-specific documents cannot necessarily be read by your RISC OS software.

Will FTPclient work through firewalls?

The current version will not.

Sometimes, when an FTP URL is launched from Hotlist, Fresco grabs it instead of FTPClient.

Both Fresco and FTPClient can handle this type of URL. The application which accepts the request can be either depending on which application received the request first.

The files I uploaded to my server are corrupted.

Files can be uploaded to FTP sites in a variety of forms, including Binary, ASCII or Local 8-bit format. Most FTP servers use autodetection to work out the format of a file. For those that do not, you will need to set the transfer type manually using the options on the Transfer menu.