CS111 and Fetch

What is Fetch

The CS111 file server is cs.wellesley.edu. This is the name of the computer from which you will be able to get important files (like lecture, lab, and problem set programs). This is also the computer to which we expect you to submit your homework. Therefore, you will need a way to transfer files from cs111 server to your computer and from your computer to the server. A standard way for computers to "talk" to each other so that they can exchange files is called the File Transfer Protocol (ftp).

There are many ftp programs available for the Mac and PCs. Fetch is the most common ftp program for the Macs. It is not available for PCs. WinSock-FTP LE is a common ftp program for Windows. It is not available for Macs. Both Fetch and WS-FTP LE are available free for academic users. It does not matter which ftp program you use. They all accomplish the same goal of transferring files between your computer and cs111 server. We have provided instructions below for how to use Fetch on the Macs at Wellesley since that is what we have in our labs. The instructions are the same for using Fetch anywhere, except you may have to start Fetch from the Macintosh HD if there is no entry for Fetch in the Apple Menu.

Instructions for WinSock-FTP are available at CWIS

Opening a connection

Start Fetch by going to the Apple Menu (top left corner) and selecting it.

Typically, Fetch will pop open a connection window.

If you do not see a connection window, then Fetch is probably already running on your computer. Take a look at the program menu (top right corner) and select Fetch.

If you are in Fetch (i.e. Fetch is the program listed in the top right corner) and you do not have a connection window open, then you need to open a connection window by selecting File-->New Connection....

Connecting to your account

Fill in the hostname with cs.wellesley.edu. Fill in your CS111 username and password. Then hit <RETURN>, or press the "OK" button.

Fetch will connect to your home directory on puma:

You may use the cs111 directory as a backup for your CS111 files. These files will be accessible only to you. Please make sure that you store all your course work there, and not in other directories, since other directories may not be secure.

Files placed in the public_html directory will be available within the Wellesley intranet (i.e. via web browsers) at the URL http://cs111.wellesley.edu/~username

Changing directories in Fetch

Fetch allows you to navigate in your personal directory: to go to its subdirectries and back. It also allows you to create subdirectories and to download, upload, and delete files (see below).

To go into a subdirectory of the current directory, double-click on the folder. If you double-click on the cs111 folder, you will see a drop folder. This is the folder where you are going to submit your problem sets. If you double-click on this folder, you will see folders PS1, PS2, and so on:

Your homework problem sets must be submitted into the appropriate folders.

To go up in the hierarchy of directories (i.e. back to cs111 or to your home directory), click on the arrow next to the current directory name (a button at the top of the Fetch window) and select a directory that you want to go to:

Your home directory is denoted by /.

You can also select Directories-->Change Directory... from the menu and type in the directory you want to go to. This option is convenient if you need to move to a directory other than your own. However, for security reasons you can only move within your personal directory, so the two methods described above are enough.

Creating a new directory

To create a new directory within the current one, select Directories-->Create New Directory from the menu, then type in the directory name in the pop-up window and hit Return

Downloading files and folders

Downloading means moving files from a server to your individual computer (a Mac or a PC). Moving files from your computer to a server is called (guess what?) uploading.

There are three ways of downloading a file:

  1. Drag it to the desktop or into a folder where you want to put it.
  2. Double-click on it. It will be downloaded to the location where you have downloaded files last.
  3. Highlight the file and click on the Get File button.

If you want to download an entire folder, you can either drag it, or highlight it and press Get. Recall that double-clicking on a folder opens it, not downloads.

Uploading files and folders

To upload a file or a folder, drag it into the Fetch window or highlight it and press the Put button. Be careful not to overwrite files on the server accidently: Fetch usually doesn't warn you before replacing a file on the server.

When overwriting a folder, Fetch doesn't always replace older files on the server by their newer copies. You may need to upload such files separately. When replacing a folder on the server, always check that all the files in this folder have been uploaded and that the older files have been overwritten by the newer ones.

Sometimes after you upload files or a folder, Fetch still shows you the list of files as it was before the uploading. To get the most recent file list, select Directories-->Refresh File List from the menu.

To submit programs of your problem sets electronically, you will need to upload the entire project folder into the folder for the problem set inside the drop folder in your account on puma.

Deleting files on the server

To delete a file on the server, highlight the file and drag it into the trash can on your Desktop. You will be asked to confirm that you really want to delete the file. Double-check the file name, and if you are sure that you are deleting a correct file, click Delete. Once the file is deleted from the server, there is no way to bring it back, unless you have another copy elsewhere. It doesn't appear in the trash can!

Downloading cs111 problem sets, labs, etc.

To download CodeWarrior projects for your problem sets and labs, and also examples used in class, you need to start a new Fetch connection (File-->New Connection), and type in cs.wellesley.edu as the server name, cs111d as the login name, and the password that you were given in class.

If you forgot the password, please ask one of the instructors or TAs or one of your fellow students.

Creating a shortcut

If you have a Mac at your dorm or at home, it is convenient to set up shortcuts to access your cs111 account and the cs111 download account. To do so, select Customize --> New Shortcut from the menu:

A pop-up window will open. Fill in the name of the shortcut (that's how it will appear in your menu), the server, and the login name. For security reason we don't recommend that you store the password, it's better to leave the password field blank. Leave the directory field blank.

When you are done, click OK.

To use your shortcut, select File-->Open Shortcut-->the name of the shortcut .

It's no use to set up shortcuts on public Macs, since they are refreshed frequently, i.e. all user-specific information on them is deleted.

Exiting Fetch

Don't forget to exit Fetch (File-->Quit or Apple-Q) when you are finished with your work.

Never leave a Fetch connection open on public Macs after you leave! If you do, you are exposing your account to anyone who happens to sit at the same machine after you. If you see someone else's open Fetch window on a public Mac, please immediately close it. You can select File--> Close or press Apple-W to close a connection without quitting Fetch.