FTP Syntax and Notes

A good FTP tutorial:

http://its.boisestate.edu/faq.htm#q2

Other Notes:


Tags: ftp, command, alternative, client, ftps, tls,

 

--------------

Original Scribble:

The following lost it's formatting, and I don't recall the source, sorry.  I think this was found when trying to script the MS FTP utility.

This connectivity command transfers files to and from a computer running an FTP service. The ftp command can be used interactively or by processing ASCII text files.

Syntax:

ftp [-v] [-n] [-i] [-d] [-g] [host] [-s: filename]

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 FTP glob command.)

host Specifies the host name or IP address of the remote host to connect to.

-s: filename
Specifies a text file containing FTP commands; the commands will automatically run after ftp starts. Use this switch instead of redirection (>).

 To use the ftp command

� At the command prompt, type ftp plus any desired switches and press ENTER.

For example, you might type ftp -s:myfile.scr

The following table shows the FTP commands available when Microsoft

TCP/IP is installed on a computer. FTP Commands in Microsoft TCP/IP

 

 

Command Purpose

! Runs the specified command on the local computer.

? Displays descriptions for ftp commands. 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, 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 computer and exits ftp.

cd Changes the working directory on the remote computer.

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 computer is printed, preceded by the string --->. By default, debugging is off.

delete Deletes files on remote computers.

dir Displays a list of a remote directory's files and subdirectories.

disconnect Disconnects from the remote computer, retaining the ftp prompt.

get Copies a remote file to the local computer, 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-mark (#) printing for each 2048 bytes data block transferred. By default, hash-mark printing is off.

help Displays descriptions for FTP commands.

lcd Changes the working directory on the local computer. By default,

the

current directory on the local computer 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 computers.

mdir Displays a list of a remote directory's files and subdirectories.

Allows you to specify multiple files.

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

open Connects to the specified FTP server.

prompt Toggles prompting. During multiple file transfers, ftp provides prompts to allow 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 computer, using the current file transfer type.

pwd Prints the current directory on the remote computer.

quit Ends the FTP session with the remote computer and exits ftp.

quote Sends arguments, verbatim, to the remote FTP server. A single

FTP

Related Scribbles:
  • java sftp client
  • System Administration
  • Free Windows FTP Server and Clients


  • ID: 212
    Author:
    leonard
    Date Updated:
    2017-03-16 10:22:54
    Date Created:
    2003-10-09 13:29:34

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> FTP Syntax and Notes
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.