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

FTP Command Line Client Program

This section provides a quick introduction of the FTP command line client program and a list of FTP commands supported by the client program.

Windows XP comes with a FTP command line client program, c:\windows\system32\ftp.exe. Once it's launched, it takes FTP commands from the keyboard. Here are some useful used FTP commands:

  • open "host_name" - Establishes a connect to the FTP server at the specified host.
  • disconnect - Stops the current connect.
  • user "user_name" - Provides user name and password to pass the access authentication.
  • quit - Quits the FTP program.
  • dir - Displays the contents of the current directory on the server.
  • cd "relative_path" - Changes the current directory to specified path on the server. "cd .." changes the current directory one level up in the directory tree.
  • lcd "relative_path" - Changes the current directory to specified path on the local system.
  • get "file_name" - Downloads the specified file from the server.
  • put "file_name" - Uploads the specified file to the server.
  • mget "*.*" - Downloads the specified multiple files from the server.
  • mput "*.*" - Uploads the specified multiple files to the server.
  • !dir - Displays the contents of the current directory on the local system.
  • type "binary|ascii" - Changes the file transfer type to binary or ASCII. In binary type, files will be transferred as is. In ASCII type, files will be transferred with automatic conversion to match the receiving system file format. For example, a text file on a Unix FTP server will be downloaded to a Windows local system with line feed character being converted to two characters, line feed and carriage return.
  • prompt - Switches on or off the prompt for confirmation when using the mget and mput commands.
  • help - Displays all available commands supported by the FTP client program.

Below is a list of all available commands supported by Windows command line FTP client program:

ftp> help
Commands may be abbreviated.  Commands are:

!               delete          literal         prompt          send
?               debug           ls              put             status
append          dir             mdelete         pwd             trace
ascii           disconnect      mdir            quit            type
bell            get             mget            quote           user
binary          glob            mkdir           recv            verbose
bye             hash            mls             remotehelp
cd              help            mput            rename
close           lcd             open            rmdir

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
FTP Command Line Client Program