IPAddr

FTP Syntax


  ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-w:WindowSize] [-A] [Host]

Parameters

-vSuppresses the display of FTP server responses.
-dEnables debugging, displaying all commands passed between the FTP client and FTP server.
-iDisables interactive prompting during multiple file transfers.
-nSuppresses the ability to log on automatically when the initial connection is made.
-gDisables 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 Ftp: Glob.
-s:FileNameSpecifies 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 (<).
-aSpecifies that any local interface can be used when binding the FTP data connection.
-w:WindowSizeSpecifies the size of the transfer buffer. The default window size is 4096 bytes.
-ALogs onto the FTP server as anonymous.
HostSpecifies 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.
/?Displays help at the command prompt.

Remarks

  1. You must prefix ftp parameters with a hyphen (-) rather than a slash (/).
  2. Ftp command-line parameters are case-sensitive.
  3. This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network Adaptor in Network Connections.
  4. Ftp can be used interactively. After it is started, ftp creates a subenvironment in which you can use ftp commands. You can return to the command prompt by typing the quit command. When the ftp subenvironment is running, it is indicated by the ftp > command prompt.

Ftp supports the use of IPv6 when the IPv6 protocol is installed. For more information, see IP version 6 and IPv6 applications.

Examples

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


  ftp ftp.example.microsoft.com

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

  ftp -A 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 Resynch.txt, type the following command:

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

Ftp subcommands

!Exits the ftp subsystem to a command prompt temporarily so that Windows XP commands can be run. To return to the ftp subsystem, type exit at the command prompt.
?Displays descriptions for ftp subcommands. Syntax: ? [Command]
appendAppends a local file to a file on the remote computer using the current file type setting. Syntax: append LocalFile [RemoteFile]
asciiSets the file transfer type to ASCII. Syntax: ascii
bellToggles an audible sound to occur after each file transfer command is completed.Syntax: bell
binarySets the file transfer type to binary.Syntax: binary
ByeEnds the FTP session with the remote computer and exits ftp.Syntax: bye
cdChanges the working directory on the remote computer.Syntax: cd RemoteDirectory
closeEnds the FTP session with the remote server and remains at the ftp> prompt.Syntax: close
debugToggles debugging mode.Syntax: debug
deleteDeletes files on remote computers. Syntax: delete RemoteFile
dirDisplays a list of directory files and subdirectories on a remote computer.Syntax: dir [RemoteDirectory] [LocalFile]
disconnectDisconnects from the remote computer and retains the ftp> prompt.Syntax: disconnect
getCopies a remote file to the local computer using the current file transfer type.Syntax: get RemoteFile [LocalFile]
globToggles wildcard expansion of local file names.Syntax: glob
hashToggles number sign (#) printing for each data block that is transferred.Syntax: hash
helpDisplays descriptions for ftp subcommands. Syntax: Help [Command]
lcdChanges the working directory on the local computer. By default, the working directory is the directory in which ftp was started.Syntax: lcd [Directory]
literalSends verbatim arguments to the remote FTP server. A single FTP reply code is returned.Syntax: literal Argument [ ...]
lsDisplays an abbreviated list of files and subdirectories in a remote directory.Syntax: ls [RemoteDirectory] [LocalFile]
mdeleteDeletes files on remote computers.Syntax: mdelete RemoteFiles [ ...]
mdirDisplays a list of files and subdirectories in a remote directory.Syntax: mdir RemoteFiles [ ...] LocalFile
mgetCopies remote files to the local computer using the current file transfer type.Syntax: mget RemoteFiles [ ...]
mkdirCreates a directory on the remote computer.Syntax: mkdir Directory
mlsDisplays an abbreviated list of files and subdirectories in a remote directory.Syntax: mls RemoteFiles [ ...] LocalFile
mputCopies local files to the remote computer using the current file transfer type.Syntax: mput LocalFiles [ ...]
openConnects to the specified FTP server.Syntax: open Computer [Port]
promptToggles between prompt mode on and off.Syntax: prompt
putCopies a local file to the remote computer using the current file transfer type.Syntax: put LocalFile [RemoteFile]
pwdPrints the current directory on the remote computer.Syntax: pwd
quitEnds the FTP session with the remote computer and exits ftp to the command prompt.Syntax: quit
quoteSends verbatim arguments to the remote FTP server. A single FTP reply code is returned.Syntax: quote Argument [ ...]
recvCopies a remote file to the local computer using the current file transfer type.Syntax: recv RemoteFile [LocalFile]
remotehelpDisplays help for remote commands.Syntax: remotehelp [Command]
renameRenames remote files.Syntax: rename FileName NewFileName
rmdirDeletes a remote directory.Syntax: rmdir Directory
sendCopies a local file to the remote computer using the current file transfer type. Syntax: send LocalFile [RemoteFile]
statusDisplays the current status of FTP connections.Syntax: status
traceToggles packet tracing.Syntax: trace
typeSets or displays the file transfer type.Syntax: type [TypeName]
userSpecifies a user to the remote computer.Syntax: user UserName [Password] [Account]
verboseToggles verbose mode.Syntax: verbose