ftp

This connectivity command transfers files to and from a host running an FTP server service, for example the Microsoft Internet Information Server. (A service is called a daemon in UNIX). Ftp is a complete 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] [hostname]

Parameters

-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 filename globbing, which permits the use of wildcard characters in local file and path names. (See the glob command in the TCP/IP Procedure Help. )

-s: filename

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

hostname

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

The following table lists the ftp commands. For details about syntax of individual ftp commands, choose the ftp commands topic in the TCP/IP Procedure Help.

Table A.1 FTP Commands in Windows NT

Command

Purpose

!

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 filename globbing. Globbing permits use of wildcard characters in local file or path names. By default, globbing is on.

hash

Toggles hash-sign (#) printing for each data block transferred. The size of a data block is 2048 bytes. By default, hash-sign printing is off.

help

Displays descriptions for ftp commands.

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 files on remote hosts.

mdir

Displays a list of a remote directory's files and subdirectories. Mdir enables you to specify multiple files.

mget

Copies 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 local files to the remote host using the current file transfer type.

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

Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return. Quote is identical to literal.

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.