Ftp

Updated: April 17, 2012

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

Transfers files to and from a computer running a File Transfer Protocol (FTP) server service. Ftp can be used interactively or in batch mode by processing ASCII text files. For examples of how this command can be used, see Examples.

Syntax

ftp [-v] [-d] [-i] [-n] [-g] [-s:<FileName>] [-a] [-A] [-x:<SendBuffer>] [-r:<RecvBuffer>] [-b:<AsyncBuffers>][-w:<WindowsSize>]  [-?] [<Host>]

Parameters

Parameter Description

-v

Suppresses display of remote server responses.

-n

Suppresses auto-login upon initial connection.

-g

Disables file name globbing. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names. For more information, see Additional references.

-s:<FileName>

Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (<).

-a

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

-A

Logs onto the FTP server as anonymous.

-x:<SendBuffer>

Overrides the default SO_SNDBUF size of 8192.

-r:<RecvBuffer>

Overrides the default SO_RCVBUF size of 8192.

-b:<AsyncBuffers>

Overrides the default async buffer count of 3.

-w:<WindowsSize>

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

-?

Displays help at the command prompt.

<host>

Specifies the computer name, IP address, or IPv6 address of the FTP server to which to connect. The host name or address, if specified, must be the last parameter on the line.

Remarks

  • For more information about ftp commands on Windows Server 2003, see Ftp.

  • Ftp command-line parameters are case-sensitive.

  • This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

  • Ftp can be used interactively. After it is started, ftp creates a sub-environment in which you can use ftp commands. You can return to the command prompt by typing the quit command. When the ftp sub-environment is running, it is indicated by the ftp > command prompt. For more information see the ftp commands.

  • Ftp supports the use of IPv6 when the IPv6 protocol is installed. For more information, see Additional references.

Examples

To log on to the FTP server named ftp.example.microsoft.com, type:

ftp ftp.example.microsoft.com

To log on to the FTP server named ftp.example.microsoft.com and run the ftp commands contained in a file named resync.txt, type:

ftp -s:resync.txt ftp.example.microsoft.com

Additional references