Windows Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

Downloading Files with FTP Commands

This section provides a tutorial example on how to download files with FTP commands.

Now, let's see how we can put some files on the FTP server to allow other users to download them.

Copy files to the FTP server directory in a command window:

>copy ftp.html c:\inetpub\ftproot
        1 file(s) copied.

>copy index.html c:\inetpub\ftproot
        1 file(s) copied.

>copy reference.html c:\inetpub\ftproot
        1 file(s) copied.

Download them with the FTP client in a command window:

>ftp localhost
Connected to localhost.
...
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
   11:05PM                 5537 ftp.html
   03:43PM                 5082 index.html
   08:39PM                 1174 reference.html
226 Transfer complete.
ftp: 155 bytes received in 0.00Seconds 155000.00Kbytes/sec.
ftp> mget *.*
200 Type set to A.

mget ftp.html? y
200 PORT command successful.
150 Opening ASCII mode data connection for ftp.html(5537 bytes).
226 Transfer complete.
ftp: 5537 bytes received in 0.01Seconds 553.70Kbytes/sec.

mget index.html? y
200 PORT command successful.
150 Opening ASCII mode data connection for index.html(5082 bytes).
226 Transfer complete.
ftp: 5082 bytes received in 0.01Seconds 508.20Kbytes/sec.

mget reference.html? y
200 PORT command successful.
150 Opening ASCII mode data connection for reference.html(1174 bytes).
226 Transfer complete.
ftp: 1174 bytes received in 0.00Seconds 1174000.00Kbytes/sec.
ftp> quit
221

Cool, downloading files are easy. The "mget" command allows you to get multiple files with one command.

Sections in This Chapter

Setting Up FTP Server with IIS

FTP Command Line Client Program

Downloading Files with FTP Commands

Checking FTP Server Log File

Uploading Files to FTP Servers

Dr. Herong Yang, updated in 2008
Downloading Files with FTP Commands