Documente Academic
Documente Profesional
Documente Cultură
FTP (File Transfer Protocol) has been around for a quite a few years now.
It has been used for file transfers since the 1980s. A common operating
system was UNIX (forerunner of Linux) and most programs were run
from the command line prompt, similar to that used in DOS, the
forerunner of Windows.
FTP is available in Windows as a ?command line
prompt? program. Once you have an Internet connection
established, either via a dial-up modem or else through your local area
network, the FTP program that comes with Windows can be used to
transfer files. It is great to know about this FTP program as it is
automatically installed with Windows, so if you (as a web developer) are
visiting a client, their Windows machine will also have FTP available. As
well as being the standard means for website up-load s, a vast store of
software applications, games, images, and other types of files are
available on FTP sites all over the world.
File Transfer Protocol uses the clientserver model. One computer (the
FTP host) runs a server program serving information to other computers.
The other computers run client programs requesting information and
receiving replies from the server.
In Windows, you
can start FTP by
choosing:
Start > Run
Then type ftp and
press <Enter>
When ftp starts, you will have a black hole window with the ftp>
prompt showing. If you type help you will get a list of the available
commands in ftp. That has been done in the screen shot above.
To get help with individual commands, you can type help commandname, for example help ls, help bye, help hash, help mdelete, and so on,
as shown here:
From the FTP screen you can connect directly to the file structure of an FTP server, and
work with the operating system of the remote computer.
You will need an ftp user namee and password. Either your web hosting service or your
RTO can tell you these details. Then you can run the ftp command to transfer files.
Make sure that you have an Internet connection first if you intend to use it for some real
file transfers. Then start FTP running.
Most FTP sites support anonymous logins where you dont have to have an account on
the FTP site in order to access the site and download files.
The user ID is the word anonymous and the password is your email address.
Often files obtained from anonymous ftp servers will be in zipped format (filename.zip).
Zip is a compressed format, allowing the file to download more quickly (and take up less
room on the server). A Zip file must be unzipped (uncompressed) once it is downloaded.
If you had your own account on IHUG, you could type your own user name and password
to login. Then you would see only your own files.
Where am I?
Once you are logged in, you can browse your way around the directories (or folders) of
the FTP server.
The command pwd (meaning "print working directory") will tell you the name of the
directory you are in. To see the files in the directory or folder, use the command ls
(standing for "list").
In this case, the working directory is "/" (which is pronounced "root"). The root directory
also contains 5 other directories or files: debian, pub, mirror, debian-non-US and
welcome.msg.
Note that the FTP client program adds some commands of its own: 200 PORT command
successful, 150 Opening ASCII mode data connection for file list.
delete files on either local or remote machine (del or delete, if you have
permission).
Make sure you take note of the differences when you examine the commands offered by
such an ftp client.
Try some of these commands out if you have FTP access to a files that you own.
To close the connection, use the bye command.
One thing to watch is that FTP closes a connection if nothing happens for 5 minutes (300
seconds).
So far, FTP has been a lot of work! It's difficult for most people to get used to using a
command line program like FTP for Windows. Most people are used to managing their
files using programs like Windows Explorer. So many software developers have created
graphical file manager interfaces that do all of the FTP commands behind the scenes so
the user doesn't have to worry about them.
Some of these FTP programs are free, while some are share-ware. Some examples are:
CuteFTP
http://www.globalscape.com/products/cuteftp/index.asp
http://www.ipswitch.com/Products/file-transfer.html
FTP Voyager
http://www.ftpvoyager.com/
SmartFTP
http://www.smartftp.com/
FTP Explorer
http://www.ftpx.com/
http://www.coffeecup.com/software/
FTP Commander
http://www.Internet-soft.com/ftpcomm.htm
In this article, we will use WS_FTP, but pretty much the same techniques apply to all FTP
clients.
To connect to your own website, you must supply your ISP, your user name and your
password.
Once you have logged in, the client displays two panes: one contains your Local site files
(those on your hard disk) and the Remote site files (those on the server).
To copy files from one site to the other, you can simply drag and drop files from one pane
to the other.
Some FTP clients create a Pending list. This shows the files in the queue to be transferred.
Navigation through the file structures is simply point-and-click, just like in any other
Windows application. A few FTP clients have a synchronise feature where both sites
change folders at the same time.
Firstly, have a current, offline version of the complete web site (on your hard disk drive).
Start the FTP client and use it to navigate to the folder where your website is stored.
Enter the details of your remote website and login with the FTP client.
If you are up loading the site for the first time, you can just drag all of the files from the
local folder to the remote folder. The FTP client will then transfer all the files and when
complete, it will usually update the folder listing at the remote end.
The only files and folders that "go live" for the CLC site are those highlighted above. The
Library folder was created by my web authoring software. The "Incoming..." folders are
for storing updates received by email.
The diagram below shows my hard disc drive version which is an exact copy of the live
version) opened in a web editor. The link is OK.
Remember, the version on your hard disk should always exactly match the live version of
the site. The disk version should be updated, tested and then these updates up loaded to
the web. After this upload, both your disk version and your live version are in synch
again.
Now with both region.html and 1region.html open, I simply copy the relevant data from
1region.html and paste it into the same location in region.html.
If I now sort the list by Modified Date my new file versions float to the top of the list:
Log on to the Internet. Start your ftp program. Choose your own site and find the
correct folder on your hard disk:
On the remote site (the Internet version) you will usually see something like this in your
ftp program:p>
Finally, highlight the files to upload on the hard disk and click the upload button:
Now use your browser to check that everything on the updated live site still works: