TCP/IP Remote Utilities

Previous Topic Next Topic

Ftp

This connectivity tool transfers files to and from a host running an FTP server service (such as Microsoft® Internet Information Services). A service is called a daemon in UNIX. The Ftp tool uses the session-oriented File Transfer Protocol. Ftp can be used interactively or by processing ASCII text files.

Syntax

ftp [–v] [–n] [–i] [–d] [–g] [–s: filename] [-a] [-A] [-w:windowsize] [hostname]

Switches

v

Suppresses display of remote server responses.

n

Suppresses autologon upon initial connection.

i

Turns off interactive prompting during multiple file transfers.

d

Enables debugging, displaying all FTP commands passed between the client and server.

g

Disables file name globbing, which permits the use of wildcard characters in local file and path names. (Also see the glob command in Table D.1.)

s: [filename]

Specifies a text file containing FTP commands; the commands automatically run after Ftp starts. Use this switch instead of redirection (<).

a

Specifies that any local interface can be used when binding the FTP data connection.

A

Logs in to the FTP server as anonymous.

w:windowsize

Specifies the size of the transfer buffer. The default windowsize is 4096 bytes.

Variables

Hostname

Specifies the host name or the IP address of the remote host to connect to. The host, if specified, must be the last parameter on the line.

Table D.1 lists the FTP commands. For details about syntax of individual commands, see Windows 2000 Help.

Table D.1 Ftp Commands in Windows 2000

Command Function
! Runs the specified command on the local computer.
? Displays descriptions for Ftp commands. ? is identical to help.
Append Appends a local file to a file on the remote computer using the current file type setting.
Ascii Sets the file transfer type to ASCII, which is the default.
Bell Toggles a bell to ring after each file transfer command is completed. By default, the bell is off.
Binary Sets the file transfer type to binary.
Bye Ends the FTP session with the remote host and exits Ftp.
Cd Changes the working directory on the remote host.
Close Ends the FTP session with the remote server and returns to the command interpreter.
Debug Toggles debugging. When debugging is on, each command sent to the remote host is printed, preceded by the string – – – >. By default, debugging is off.
Delete Deletes files on remote hosts.
Dir Displays a list of a remote directory's files and subdirectories.
Disconnect Disconnects from the remote host, retaining the Ftp prompt.
Get Copies a remote file to the local host using the current file transfer type.
Glob Toggles file name globbing. Globbing permits use of wildcard characters in local file or path names. By default, globbing is on.
Hash Toggles number-sign (#) printing for each data block transferred. The size of a data block is 2,048 bytes. By default, number-sign printing is off.
Lcd Changes the working directory on the local host. By default, the current directory on the local host is used.
Literal Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return.
Ls Displays an abbreviated list of a remote directory's files and subdirectories.
Mdelete Deletes multiple files on remote hosts.
Mdir Displays a list of a remote directory's files and subdirectories.
Mget Copies multiple remote files to the local host using the current file transfer type.
Mkdir Creates a remote directory.
Mls Displays an abbreviated list of a remote directory's files and subdirectories.
Mput Copies multiple local files to the remote host using the current files and subdirectories.
Open Connects to the specified FTP server.
Prompt Toggles prompting. Ftp prompts during multiple file transfers to enable you to selectively retrieve or store files; mget and mput transfer all files if prompting is turned off. By default, prompting is on.
Put Copies a local file to the remote host using the current file transfer type.
Pwd Displays the current directory on the remote host.
Quit Ends the FTP session with the remote host and exits Ftp.
Quote Same as the Literal command.
Recv Copies a remote file to the local host using the current file transfer type. Recv is identical to get.
Remotehelp Displays help for remote commands.
Rename Renames remote files.
Rmdir Deletes a remote directory.
Send Copies a local file to the remote host using the current file transfer type. Send is identical to put.
Status Displays the current status of FTP connections and toggles.
Trace Toggles packet tracing; trace displays the route of each packet when running an Ftp command.
Type Sets or displays the file transfer type.
User Specifies a user to the remote host.
Verbose Toggles verbose mode. If on, all FTP responses are displayed; when a file transfer completes, statistics regarding the efficiency of the transfer are also displayed. By default, verbose is on.

© 1985-2000 Microsoft Corporation. All rights reserved.