Ftp


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

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


Copy Code

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

Examples

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


Copy Code

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:


Copy Code

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

Additional references