There are a lot of FTP programs available for Windows that make FTP file transfers a snap. Yet many die-hard users who migrated from DOS and command-line FTP actually prefer the console version included with Windows 2000 for certain tasks. For those who do, here are a few tips that can help you get the most from Windows 2000’s FTP console.

Getting started with the FTP console
To use FTP, open a command console and issue the command FTP. To indicate that you’re working in an FTP session (see Figure A), the prompt will change to this:

Figure A
Some FTP sites require a username and password.

Type Open and the DNS name or IP address of the FTP site. For example:

The FTP utility provides several commands for navigating directories, setting the file mode for download (text or binary), downloading files, uploading files, and more. These are the most common commands:

  • CD (Change Directory): Use to change to another directory on the server
  • PWD (Print Working Directory): Shows you the current directory on the server
  • BIN: Sets the file transfer mode to binary for transferring binary files
  • GET <file>: Downloads the file specified by the <file> string
  • PUT <file>: Uploads the file specified by the <file> string
  • LCD <path>: Sets the current local directory to <path>
  • CLOSE: Closes the current FTP connection
  • BYE: Exits the FTP utility

To view the list of FTP commands, simply type Help at any FTP prompt, as shown in Figure B. Type Help <command> to get help with a specific command.

Figure B

Download and upload multiple files with ease
You can use the MGET command to download multiple files, such as all of the files in the current folder. Once you’ve connected to an FTP server, use the CD command to navigate to the desired directory. If you’re transferring binary files, issue the BIN command to set the transfer mode. Then use the LCD command to specify the local directory to which the files will be downloaded. You can also, issue the command MGET string where string specifies the files to retrieve. If you want to get all of the files, use the command MGET *.*.

Another command that comes in handy when using MGET is the PROMPT command, which turns interactive prompting on and off (see Figure C).

Figure C

For example, if you use MGET with prompting turned on, FTP will prompt you to respond with a Y or N to each file. You can execute the PROMPT statement to turn prompting off, allowing FTP to download all of the files without your response.

When you need to upload a batch of files, you can use the MPUT command rather than uploading them one at a time. As with MGET, you can turn off prompting with the PROMPT command first.

Manage your local files
One more command that Windows users will find useful is the ! command, which opens a command console shell from the FTP session. This lets you browse the local file system, perform file management, or execute other commands on the local computer. When you’re ready to return to the FTP session, just type EXIT. You’ll go right back to the FTP session without closing the connection to the remote server.