% ftp ftp.microsoft.com Connected to ftp.microsoft.com. 220 ftp Windows NT FTP Server (Version 3.51). Name (ftp.microsoft.com:nigelh): anonymous 331 Anonymous access allowed, send identity (e-mail name) as password. Password: 230-This is ftp.microsoft.com. Please see the index.txt file for more information 230 Anonymous user logged in as anonymous. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. bussys deskapps developr ... ### several lines deleted support-phones.txt WhatHappened.txt 226 Transfer complete. 227 bytes received in 0.031 seconds (7.1 Kbytes/s) ftp>
ls(the command dir is a synonym) to see what files are in the current directory.
cdto change to another directory.
cd ..(as in Unix) to return to a parent directory. Some machines do not support the .. name. On these machines, you must use the command cdup .
ftp> get support-phones.txt 200 PORT command successful. 150 Opening ASCII mode data connection for support-phones.txt(5095 bytes). 226 Transfer complete. local: support-phones.txt remote: support-phones.txt(A synonym for get is recv.)
get xxxx yyyywhich requests that a file named xxxx on the remote machine be retrieved and stored on the local machine with name yyyy.
mget *.cBy default, ftp prompts to ask whether you wish to transfer each file whose name matches the pattern. If you do not wish to be prompted, you should enter the command
promptbefore using the mget command. (And to restore prompting, just use the prompt command again.)
lcd ddddto change to directory dddd (and .. may be used as a directory name to go up to a parent directory on your local machine).
!ls -l
cd DDD
cd ..
cdupchange current directory on remote machine lcd DDD change current directory on local machine ls
ls -l
dirlist contents of current directory on remote machine get fff
recv fffget file fff from remote machine put fff
send ffftransfer file fff from local machine to remote machine
(note: requires write permission on remote machine and
anonymous users do not usually have such permission.)binary perform transfers in binary mode ascii perform transfers in ASCII mode mget ppp multiple get of files with names matching pattern ppp mput ppp multiple put of files with names matching pattern ppp close terminate the ftp connection, but do not quit the ftp
program; this command is normally followed by openopen xxx open a connection to machine xxx !CCC execute command CCC on local machine quit
byequit the ftp program