Computer 101: Lesson 3
How to put files on the server and get files from the server.
Sooner or later, you will need to put a file on the server. One way
to do this is by dragging them to or from your desktop. Another way
is by ftp. If the computer is located here, you can drag them
from within Windows. Otherwise, you'll have to use ftp.
|
Dragging files to your desktop.
- Make sure your computer and monitor are turned on before starting.
- Check to make sure you're logged in on your Windows computer
with the same name as the first part of your email address.
This is very important. Windows, being sometimes a little slow
on the uptake, finds the idea that the same user might have different
names on different computers inconceivably baffling.
- Click the gray Start button in the lower left corner of your
screen. This is the button that has the word "Start" printed
on it. A little menu should appear.
- Click on "Shut Down..."
- There should be a menu or clickbox to select the desired
options. One of the menu items will be "Log off <Name >".
DON'T click on this. Just make sure the name is the same
as the first part of your email address.
- If it's not, you'll need to create a new user profile on
your computer. You should login to your Windows computer
using that name all the time.
- If the names are the same, this is good. It means you should
be able to transfer your files.
- Close the "Shut Down" dialog box by clicking "Cancel", and click
on "My network places", or "Network neighborhood".
- Continue clicking on the little computer icons until you find the
icon for the server.
- Click on the icon that has the server's name on it.
- A bunch of other icons should appear. One of them should be
"Homes". Or there might even be one that has your username
already on it. Click on that one.
- In some versions of Windows, this will cause a little box to appear
that says "Incorrect password or unknown username for: <servername >".
If this happens, don't panic. Just type the username and password that
were given to you when your email account was activated. Or, if you
have changed your password, type your new password in the lower box.
- Click OK.
- You should now be able to drag files to and from the server.
Someone said I should copy a file by ftp. What is this, and how can I
avoid doing it? Could you do it for me?
This is a task you must learn by doing, like milking a cow or doing
square roots by hand. Once accomplished, you will have a warm fuzzy
feeling inside. We will go through the procedure step by step.
Step 1: Gather the preliminary information
- First you need to decide whether to use "anonymous ftp" or
"regular ftp". The general rule is: if the file already belongs
to you, use regular ftp; otherwise, if it's a file that has been
made available to everyone, use anonymous ftp.
- Next, you need to find out the name of the file and the name of
the server. This is something that someone has to tell you.
For this example, we'll assume the server name is
and the name of the file is
Step 2: Start the ftp program
- The word "ftp" can mean the "file transfer protocol" or the act
of getting a file using ftp. The program that does this
is, conveniently enough, also called "ftp". This makes it really
easy to remember. Imagine the difficulty if it were called
"pavuk" or "zshzftpsys".
In fact there are other programs besides "ftp" that do ftp.
Many of them are easier to use than "ftp", with graphical user
interfaces, the ability to copy entire directories, and the like.
Some of them are even secure enough to use safely. But few people
use them, because they cannot remember the name of the program.
- The first step is to once again click on the Start Button.
- A menu will appear. Click on "Run...". Et voilą, a small
dialog box should appear on your screen.
- In the small box, type
If you're behind a firewall, the above command might not work.
If the computer says:
425 Can't build data connection: No route to host. |
you need to change the command to
If that doesn't work, ask the network person for help.
Or, get a copy of CuteFTP and use that instead. (You will
have to change the settings to make it use "passive FTP").
- Click the OK button. After a short delay, the computer will
say something like:
220 somewhere.com FTP server (Version wu-2.6.0(1) Sun Oct 13
18:51:05 EDT 2002) ready.
Name (stuff:none): |
- At this point, type "anonymous" (without the quotation marks).
Of course, if you
were ftp'ing to your departmental server, you would type your username
instead of "anonymous".
- Next, press the "Enter" key on your keyboard. This is how the
computer knows when you are done typing.
- Release the "Enter" key.
- Next, type your email address. You have to give it the correct one,
because the server
will know if you just make something up. Some servers are deeply offended
by this breach of Internet etiquette and will print something quite rude if
you type a bad email address.
331 Guest login ok, send your complete e-mail address as password.
Password: |
Some servers are even sneakier and just say
Don't type your password here. It won't work.
- Type your email address, and press the "Enter" key again.
Of course, you only type your email address if you are logging in as
"anonymous". If you're logging onto a system where you have an email
account, you wouldn't type your email address. You
would type your real password instead. Is this confusing? Good!
- If all goes well, the remote server should say:
230 Guest login ok, access restrictions apply.
Remote system type is UNIX. |
- Congratulations, you are now logged in on the server.
Step 3: Get the file
- No doubt you may have noticed on your own computer that files are
usually stored in folders or "directories". The same is true with
servers. You have to navigate to the folder or "directory" where
the file is located. Since you already know the directory name,
we don't have to search for it on the server.
Just type the following command: and press
the "Enter" key.
- The computer should say
250 CWD command successful. |
- If you want to find out what files are there, type the command
and press the "Enter" key. It will print a list of the files on the
server in the current directory. For example,
drwxr-xr-x 3 root root 180 Jul 12 2001 more_files
-rw-r--r-- 1 root root 101 Mar 18 2001 stuff.doc |
- But notice the first entry starts with a 'd'. This means is a
directory. If you wanted to, you
could snoop around by typing "
cd more_files"
to see what's in that
directory. When you're done you could type to go
back up. Don't forget to press the "Enter" key each time you do this,
or the computer will not do anything. Don't forget to type those two
dots. They are part of the command.
- If you get lost, type
which will tell you where you are located in the
directory tree.
- Next, type
and press the Enter key. "Bin" is short for "binary".
It's necessary to type this because many years ago, ftp used "ASCII"
as the default. This
would cause problems with many types of files. So in every operating
system except Windows, the default was changed to "BIN". Windows, of
course, still uses "ASCII" because Microsoft wants to make ftp as
inconvenient and troublesome as possible so that people will want
to buy Windows.
- Now, type
or whatever the filename was.
Note that it is vitally important not only to spell the filename right,
but to use the exact same capitalization that the filename uses. If the
filename contains spaces, you need to enclose it in quotes like this:
In most operating systems, you can copy and paste the filename by clicking
the middle mouse button to save yourself the trouble of typing a long
filename like "xemacs-19.13-i486-unknown-linuxaout-motif.tar.gz" or
"Lexmark-7xxx-57xx-Z51-printer-driver__pbm217k-0.990516.jbl.gz".
Needless to say, this doesn't work in Windows and you have to type
the entire filename. But there are tricks you can use to avoid this.
- Press the "Enter" key.
- Congratulations, you successfully ftp'd a file. If you were
connected to your own account on the departmental server, you could
also have typed
This would have transferred the file from your local PC to the server.
But most public servers don't allow ordinary people to send them files.
Step 4: Figure out where the file is being put
- The file will not necessarily show
up on your Desktop. The ftp program puts the file in the directory you
are currently in. So, it's always a good idea to
type before you log off. Press "Enter" after typing
this command. Don't forget to type the dot. It is part of the command.
Also, don't forget the space between the "lcd" and the '.'.
Amazingly, some versions of Windows actually follow the spec and will
print the current local directory as they are supposed to:
This means you will have to click on "My computer" and "Local Disk C:" in
order to find the file. Write this down on a piece of paper somewhere.
- In fact, if you're ambitious, you can type things like:
lcd "C:\Documents and Settings\myusername\Desktop" |
substituting your actual username for "myusername". Any files you get by
ftp will then show up on the Desktop. Since one of the directory names
contains spaces, you need to enclose the entire path in quotes.
- If this fails, don't panic. If you remember the filename, you can
always find it later by clicking the Start Button again and clicking on
"Search".
Step 5: Getting multiple files
- Suppose there is a large number of files on the server. Do you
have to type each filename by hand? No. First, turn off the prompt
so ftp stops asking for confirmation
before sending each file:
The computer will say
- Next, it's a good idea to type a "dir" command. For example, if
you want to list all files whose name starts with an 'h', type
If you want to see all files that start with 'h' and end with ".jpg",
type
- If you're getting a lot of files, it's a good idea to put them
in a separate folder. Make a folder in "Local Disk C:" of your Windows
computer by clicking on "My computer | Local Disk C:" and right-clicking
the mouse in the "Local Disk C" window. Then go back to the ftp window
and type
- Then use the mget command to get
all the JPEGs whose names start with 'h':
This can also be useful even for getting a single file if you don't
want to type the entire filename. The mget
command doesn't care how many files it gets. It can get one file or a
thousand.
- There is also a corresponding command for sending multiple files
from your PC to the server.
will send all files that start with 'h' and end with ".jpg' from your
PC to the server. Of course, it won't work if you're logged in as
"anonymous".
Step 6: Log off
- This step is easy. Type
If you don't log off but just click the little "X" in the ftp window
instead, the server will think you are still there, lying in front of
your computer dead, for the rest of eternity.

January 19, 2003