The ftp
command can be used to copy files to and from a remote machine. Command line FTP is one way of using FTP. There are others, like using your browser's FTP capabilities
(
Using Netscape for FTP), or using one of the freeware programs available on the net.
If you're using Windows, you'll have to switch to DOS first. Click the 'Start' button at the bottom left corner of your screen. Select 'programs'. Select 'MS-DOS prompt'. This will blank out your screen, except for a directory name at the bottom of the screen (usually C:\Windows) followed by a >. This is the so-called command line. You can't use your mouse here. Anything you want to do here needs to be accomplished by typing commands at the command line and hitting enter.
When you start up MS-DOS, you will probably be in a directory called C:\Windows. Your command line prompt will show you your current directory.
If you want to use FTP to upload files, you need to go to the directory where your files are. It is easiest to do this before starting up the actual FTP session. For this purpose, you can use the following commands. The commands are not case-sensitive.
cd ..
will take you one level upwards in the directory structure;
cd directoryname
will take you one level downwards in the directory structure,
to the directory with the specified name;
dir
will show you a list of subdirectories and files in your current directory.
Start FTP by typing ftp servername.com
at the command line and hitting enter, replacing 'servername' with the name of the server you want to access. Enter your user-id and password when asked to do so (some servers allow anonymous FTP access, often requiring you to enter 'anonymous' as your user-id and a valid email address as your password).
If you need to navigate from one directory to another on your local machine, you can use lcd ..
and lcd directoryname
. Note that these commands slightly differ from the ones you had to use before starting the FTP session.
On the remote machine, you can use cd ..
and cd directory name
to navigate. To see your current directory on the remote machine, enter pwd
.
Before downloading or uploading files, you'll need to specify the kind of files you will be transferring. You either enter ascii
, for text and HTML files, or binary
, for other file types, like graphics.
Enter get filename.extension
to download a file. Enter put filename.extension
to upload one file. Enter mput *.*
to upload all files in your current directory. Enter mkdir
to make a directory, and rmdir
to remove one. Enter delete filename.extension
to remove a file from your current directory.
Enter quit
to end the FTP session. This wil sever your connection with the remote machine.
If you're using Windows on your local machine, enter exit
to return to Windows.
On this page Transitional HTML 4.01 and CSS 1 are used. If you're seeing this text you either have CSS switched off in your browser, or you're using a browser that can't handle CSS. If you're using an older browser version, you might want to consider upgrading.