Using FTP

FTP ("file transfer protocal") is a program available on many computers at Niagara and elsewhere that allows you to copy a file from one computer to another over a computer network.

To "upload" a file means to copy it from a "local" computer (often, a personal computer whose keyboard you're using) to a "remote" computer (often, a larger system such as Niagara's "cis"). To "download" is to copy the file in the other direction -- remote machine to local machine.

Since most Niagara users of FTP use a personal computer as their local computer, such will be assumed in the following discussion. Notice, however, that with minor modifications, the following is easily generalized, so that, e.g., you could use FTP to copy a file from "cis" to, say, another Unix computer.

When you establish an FTP connection between your PC and a remote computer, you usually must "login" to the remote computer. Thus, although there are exceptions (some systems allow "anonymous" FTP connections in order to facilitate the exchange of public domain information and services), it's usually necessary to have login access to the remote computer, including username and password.

If your account on the remote computer has multiple directories, you may then use the "cd" command to change directories (if the file you wish to download isn't in your root directory/folder, or if the destination of the file you wish to upload is in a subdirectory/subfolder). WINDOWS version: Click ChgDir, then enter or click the appropriate directory/folder.

Most files you will wish to upload or download will be ASCII text files. If you wish to transfer a binary file, you must remember to use a "binary" or "ascii" command to change between file types as needed (i.e., the default is "ascii", so you really only need to change to do a "binary" upload/download, or if you follow a "binary" upload/download with an "ascii" upload/download). An example of a binary file you might wish to upload/download is a ".gif" or ".jpg" graphic file for a World Wide Web page. WINDOWS version: click the appropriate ASCII or Binary optionbutton.

THE DEFAULT DISK DRIVE and directory (folder) on your PC may not be what you want. Use the ftp command "lcd" (local change directory) to change the default drive (and subdirectory/folder) on your PC. Examples (what you type is underlined):

   ftp> lcd a:\        changes the default directory (folder) to the
                       root directory (folder) of the disk in drive A:

   ftp> lcd c:\letters   changes the default directory (folder) to the
                         LETTERS subdirectory (folder) of the disk in
                         drive C:
WINDOWS version: Click ChgDir, then enter or click the appropriate (drive and) folder.

Establishing Your FTP Connection

To Upload a File

  1. If not already done, establish the FTP connection to the remote computer as discussed above.
  2. If necessary, use "cd" as described above to get to the correct subdirectory (folder) of your account on the remote computer. This sets the subdirectory as the destination of the uploaded file. If the desired destination of the uploading file is the root directory (folder) of your account on the remote computer and you haven't done a change of directory, you may omit this step.
  3. If necessary, use "lcd" as described above to get to the correct subdirectory (folder) of your PC (or, more generally, the local computer). This sets the subdirectory that is the source of the uploading file.
  4. To upload a file, use the "put" command. For example, if you have an ASCII file in your current directory (folder) whose name is BLAH.TXT, use
     
      ftp> put blah.txt
    
    to copy the file to the remote computer. Some versions of FTP will ask for a file name to be used with the uploaded file on the remote computer; others will automatically use the same name.

    WINDOWS version: in the Local System half of the display, highlight the file you wish to upload, then click the arrow pointing from Local System to Remote System.

    NOTE: uploading a file frequently results in a garbage line being appended at the end of the uploaded file. This is easily removed by using a text editor such as VI.

To Download a File

  1. If not already done, establish the FTP connection to the remote computer as discussed above.
  2. If necessary, use "cd" as described above to get to the correct subdirectory (folder) of your account on the remote computer. This sets the subdirectory as the destination of the uploaded file. If the desired destination of the downloading file is the root directory of your account on the remote computer and you haven't done a change of directory, you may omit this step.
  3. If necessary, use "lcd" as described above to get to the correct subdirectory of your PC (or, more generally, the local computer). This sets the subdirectory that is the source of the uploading file.
  4. To download a file, use the "get" command. For example, if your file is named LETTER.DAT on the remote computer, you can download it to the destination directory of your local computer via
     
         ftp> get letter.dat
    
    Some versions of FTP will ask for a file name to be used with the downloaded file; others will automatically use the same name.

    WINDOWS version: In the Remote System half of the display, highlight the file you wish to download, then click the arrow pointing from Remote System to Local System.

Breaking Your FTP Connection

Back to Boxer's Home Page