BIO 256 - Computer Applications in Biology

Assignment 3 - Using FTP (File Transfer Protocol)

Important References:

One of the things that computer networks do is to move computer files between computers. One of the first ways to do that on the Internet was File Transfer Protocol (FTP). Even though there are more sophisticated ways of doing it now, FTP is the method that works in the greatest number of situations.

Like many other network activities, FTP uses two kinds of programs, an FTP client (which in this assignment will be running on the computer you are using) and an FTP server (which runs on the Intranet; on Unix computers, this program is often called an "FTP daemon"). You don't have to worry about the server, but you do have to worry about the client. There are two different types of FTP clients, command-line programs and graphical programs.

  • Command-Line Programs: The original FTP programs worked like this. You get a prompt (something like FTP>), and you type commands. If you were to use FTP on the Unix shell of the Intranet, you would get command-line FTP. Also, Windows 98 and Windows 2000 come with a command-line program, not surprisingly called FTP.EXE, which you can access from the Run item of the Start button.
  • Graphical Programs: Graphical Programs: Most Windows machines at Cal Poly Pomona have WS_FTP installed (see the top of this page for the links to download it). Graphical programs display the remote computer with familiar icons of folders and trees. This is about all you'll see on Macintoshes, with the commonest program being Fetch (see the top of this page for the link to download it).

An important "feature" of FTP is the need to specify what type of file is being transfered. Below is a table that shows the possibilities. When in doubt, choose binary (or raw data, in Fetch's terminology); this copies the file exactly, byte for byte. ASCII stands for "American Standard Code for Information Interchange", an older way of coding alphabetic characters on computers. It is a subset of ANSI ("American National Standards Institute") coding, used in Windows 98 and Macintosh, which is itself a subset of Unicode, used in Windows 2000 and Macintosh OS/X. Character codes could be an entire lesson in themselves, but all you need to know now is that ASCII or "Text" is only for files created with text editors such as Notepad or SimpleText (it can also be used for HTML files, the standard on the Web). The reason for this special mode for text files, is that even though there are only three different ways to mark the end of a line of text, DOS/Windows, Macintosh, and Unix each use a different one. Word processor files are not actually text files, so you should use binary mode for them. Macintoshes have an additional format, MacBinary, which is absolutely necessary for Macintosh program files, and makes life easier for Macintosh data files (although raw data mode works also). Note: It is generally not possible to transfer a Macintosh program to a DOS/Windows machine and then to another Mac and still have it work.

WS_FTP Win95 FTP Fetch When to use
Binary binary Raw Data Most files
ASCII ascii Text Only for notepad/simpletext/HTML
    MacBinary Macintosh program files

Using Fetch or WS_FTP is reasonably straightforward, and they both have help files. WS_FTP has two windows, one for the remote machine and one for the local machine, and buttons for various functions. Fetch shows a folder view of the computer you are connected to, and "get" and "put" buttons ("get" transfers a file from the remote machine to your machine, and "put" does the opposite) that pop up a file dialog.

Using a command-line program such as the Windows 98 FTP is not as simple, since all you see is the prompt ftp>. An important command is help; help followed by the name of the command gives help on that command. open followed by the address (e.g. connects to an FTP site. dir shows the contents of a directory, just as in DOS. get and put do what you might imagine, as do binary and ascii. cd changes directories (just as in DOS, but remember that the slashes go the other way: /, not \). cd .. changes to the parent of the current directory, just as in DOS. mkdir makes a new directory (md also works with some FTP programs, but not Windows 98's).


For this assignment, I will assume you are using WS_FTP at one of the student labs (you can probably complete the assignment with another FTP program). What you are going to do is use FTP to copy a file from a specific place on the Cal Poly Intranet (which will be the server in this case) to your computer (the client). Then you are going to add your name to the file, change the file name, and then copy the file to a different place on the Cal Poly Intranet.

Before you can do any of this, you will need to know the username and password for your Cal Poly computer account. This information is provided to you when you register for classes. For most people, the user name is the first two initials plus the last name, so that for me, James Curtis Clark becomes jcclark. The password is initially set to your birthdate, YYMMDD, so that a birthdate of February 29, 1983, would translate to 830229. If none of this information is of any use, go by the computer helpdesk or the computing commons, both in the CLA, with your student i.d. and ask for the imformation.

To begin the assignment, first run the WS_FTP program (there may be an icon on the desktop - if not, the click Start, select Programs, and look for WS_FTP). When you load the program, what you'll see should be pretty similar to this, except the boxes won't be filled in yet. (I've put the picture as a separate link so that it won't distort the text if you are using a small monitor. You can print it out separately if you want it on paper.) You need to fill in the Session Properties in order to get connected to the server. Leave the Profile Name box blank (or you can type the word intranet). For Host Name/Address put in The Host Type must be Automatic detect. In the User ID box, type your Cal Poly Intranet user name. Leave the password box blank; it will ask you for your password later. The Anonymous and Password check boxes and the Account and Comment boxes should be blank. Don't click OK yet! Click the Startup tab at the top. In the box labeled Initial Remote Site Folder, enter /dfs/group/biology/bio256/ (you must enter it exactly as it appears here). Now you can click OK, and it will ask you for your password. Type it in, hit OK, and you should connect to the server.

If you have successfully connected to the server, what you're seeing should resemble this. The panel on the right (Remote System) is the server (, the panel on the left (Local System) is the computer you are using (the client).

What you need to do is copy the file bio256.txt from the Remote System to the Local System. If you are in the student labs, there is one complication: you are not allowed to write on the C:\Program Files\WS_FTP directory. Therefore, on the left panel (don't try this on the right panel!), click the green "up arrow", and keep going until you have changed to the C:\TEMP directory (you'll have to go up to C:\ and then back down to C:\TEMP). If you are working on your own machine, you can transfer the file to anyplace you want, as long as you remember where you put it (the Desktop is always a good place--in WS_FTP it is C:\WINDOWS\DESKTOP if you are using Windows 98).

Below the panels, click the ASCII button. The bio256.txt file is an ASCII file, so you need to do an ASCII copy. Now, simply click the bio256.txt file in the right panel to select it (just like in the picture), then click the arrow button that points from the Remote System toward the Local System (right to left). If you were successful, the bio256.txt file should now appear in the left panel (it will still be in the right panel, too, since you copied it rather than moved it), and the text information at the bottom of the window should indicate that the transfer was successful and complete. You need to have a successful AND complete transfer - it is possible for a transfer to be complete but not successful - and this won't get you any credit!

Now you will need to open and edit the file bio256.txt. If you are on a Windows system, the best way to do this is to use Windows Explorer to find where you put the file, and then double-click it, which will open it in Notepad. If you are on a Macintosh, and don't have access to a Windows machine, email me ( for guidance on what to do.

The file provides a blank line where you must type in your name and SSN. Do so, save the file, and change its name so that instead of bio256.txt, it takes its name from your Cal Poly Intranet user name. If you were Charles R. Darwin, it would be crdarwin.txt. If you were me (which you aren't, because I am), it would be jcclark.txt.

Next, you will transfer the file to a folder called "ftp" in my account on the Cal Poly Intranet. Open WS_FTP again. For Host Name/Address put in (unless it is already there from last time). The Host Type must be Automatic detect. In the User ID box, type your Cal Poly Intranet user name again. Leave the password box blank as before (so that it will prompt you). The Anonymous and Password check boxes and the Account and Comment boxes should be blank. The screen will look like this. Don't click OK yet! Click the Startup tab at the top. In the box labeled Initial Remote Site Folder, enter /dfs/user/jcclark/ftp/ (you must enter it exactly as it appears here). Now you can click OK, fill in your password as before, and you should connect to the server.

You will see the files that other students have uploaded (if you are the first, the folder may be empty). You can read these files (not that there is any point to it), but don't try to erase them. If you should succeed, you will receive an "F" in the course and will be subject to further disciplinary action (all actions on the Cal Poly Intranet are logged). What you want to do instead is to copy your file into the folder. Remember to check ASCII, highlight the file in the left window, and use the left-to-right arrow to transfer it. Once you see it in the remote folder with all the other files, you have successfully transfered it.

Your grade will be based on two factors: the presence of the file with the correct file name in the "ftp" folder on the Intranet, and the presence of your name and SSN in the file.

Summary of assignment

Check off Format Content Subject line
file transfer As specified n/a