FTP Instructions for transferring files from your local computer to Commonwealth’s Internet Server

FTP (File Transfer Protocol) is a method of moving files back and forth between two computers connected by some sort of communications network. Originally developed on Unix systems, it is commonly used for file transfers on TCP/IP (Transmission Control Protocol/Internet Protocol) networks which are the foundation for much of the Internet.

Commonwealth’s servers have a host program running which processes FTP commands received from remote systems. So in order to do FTP transfers to and from our server you need to have a local FTP client program and be connected via TCP/IP. Connection via TCP/IP happens when you dial-in to Commonwealth’s Internet Service to browse the World Wide Web or to send or receive email. There are many FTP clients programs available for many different computer platforms. What will be described here is a basic set of commands and procedures common to many FTP implementations.

Basic Set of FTP Commands

OPEN - This command is used to start an FTP session on a remote computer. Often you will be

asked for a username and password to gain access. The format of this command is

"open <location> " where <location> is a valid FTP address.

PWD - This command is used to Print Working Directory. This shows you the current directory

on the remote machine.

CD - This command is used to change directories on the remote machine.

LCD - This command is used to change directories on the local machine.

DIR - This command is used to view the file names in the current remote directory.

BINARY - This command changes the type of transfer to binary mode. This is needed if you

are transferring files that are more complex than plain ASCII text, such as graphic

images.

PUT - This command is used to send a file up to the remote system from the local system.

GET - This command is used to receive a file from the remote system to the local system.

CLOSE - This command is used to end an FTP session on the remote computer.

QUIT - This command ends the FTP program on the local computer.

HELP - This command displays a list of valid FTP commands, or if used with a command, gives

a definition of that command. For example, to find out what the LCD command does,

you would type "HELP LCD".

 

Basic Outline of an FTP session

Here is the description of a general set of steps in a typical FTP session.

1) Using your communication access method (PPP dialer), establish a connection to the

Commonwealth Internet Server. This is basically dialing in to browse the Web or

do email. Browsing a page from the Internet is a good way to test that your connection

is good.

2) Start the FTP program on your local computer. This might involve clicking on a shortcut or

opening a command prompt window and typing the command "FTP". You should

get a line prompting you with "ftp>".

3) Open a connection to the FTP host on the Commonwealth Server by using the command

"open ftp.comclin.net". You will asked for a username and password. You

should use the same values as you use for email.

4) Check your current directory on the remote machine, and if it is not where you wish to be,

use the "cd" command to move up or down the directory tree. This is like MS-DOS

or Unix. Note that the default directory when logging in via FTP is the same as where

Web pages are normally stored.

5) Check your current directory on your local machine, and use the "lcd" command to navigate

to where you want to be.

6) Transfer files in either direction between your local machine and the remote machine using

the "put" and "get" commands. If you are transferring files such as programs or

images, use the "binary" command to set the transfer mode accordingly.

7) When you are done, use the "close" command and then the "quit" commands to end

your FTP session. Note that the FTP session can be active at the same time as your

Web browser, so you can use FTP to transfer files into the directories where Web

pages are kept and concurrently view them with the browser.

 

Example of a transfer session.

What follows is an example of an FTP dialog in which a image file is put into the "WWW root" directory for a fictious user, JOESMITH. Comments on each line are in square brackets to the right and should not be typed. It is assumed that dial-up has been successfully completed and is working normally, and the FTP program on the local computer has just been started. Lines on which you would be

typing information have been made italic for clarity. It is assumed that the file to transferred is named

logopict.jpg and is in the root directory of the local machine.

ftp> open ftp.comclin.net

Connected to jaguar.comclin.net.

220 jaguar Microsoft FTP Service

User (jaguar.comclin.net:(none)): joesmith

331 Password required for joesmith.

Password: [password is typed here]

230 User joesmith logged in.

ftp> pwd [see where I am]

257 "/joesmith" is current directory.

ftp> binary [set binary transfer mode]

200 Type set to I.

ftp> put logopict.jpg [upload the file]

200 PORT command successful.

150 Opening BINARY mode data connection for LOGOPICT.JPG.

226 Transfer complete.

38098 bytes sent in 6.06 seconds (6.29 Kbytes/sec)

ftp> dir [check the file is there]

200 PORT command successful.

150 Opening ASCII mode data connection for /bin/ls.

04-04-97 11:36PM 38098 LOGOPICT.JPG

...

... other files in directory ...

...

226 Transfer complete.

413 bytes received in 0.99 seconds (0.42 Kbytes/sec)

ftp> close [end FTP session]

221

ftp> quit [exit from local FTP program]

BACK TO  Technical Support Page

last updated: 10/27/00