Screenshots
Ftp7 Source Code
 previous   up   next 

Ftp7 is the Seed7 version of the FTP Internet file transfer program.

Ftp7 provides an user interface for the Internet standard File Transfer Protocol. The program allows an user to transfer files to and from a remote network site. Additionally it can be used to obtain information from the remote computer and to perform several maintenance tasks.

usage: ftp7 connectStri [port]

If port is not specified port 21 is used. The parameter connectStri can speciy a user and a password. E.g.:

ftp7 user:password@hostName

If no password is specified the password anonymous is used instead. E.g.:

ftp7 user@hostName

If no user and password are specified the user anonymous is used together with the password anonymous. E.g.:

ftp7 hostName

Ftp7 connects to the specified host, and logs in with the specified user and password. If the login succeeds it writes a prompt:

ftp7>

Then it reads commands from the console and executes them. The following commands are supported by ftp7:

ascii    Set file transfer type to ASCII.
binary    Set file transfer type to binary.
bye    Terminate ftp session and exit.
cd    Change remote working directory.
delete    Delete a remote file.
dir    List contents of remote directory.
exit    Terminate ftp session and exit.
get    Retrieve remote file and store locally.
help    Print help information.
lcd    Change local working directory.
ls    List files in the remote directory.
ls -l    List contents of remote directory.
mkdir    Make directory on the remote machine.
modtime    Show modification time of remote file.
put    Store a local file on the remote machine.
pwd    Print working directory on remote machine.
quit    Terminate ftp session and exit.
rename    Rename a remote file.
rmdir    Remove directory on the remote machine.
size    Show size of remote file.

Commands to be executed on the local machine start with an exclamation mark (!). The following local commands are supported by ftp7:

!dir    List contents of local directory.
!ls    List files in the local directory.
!ls -l    List contents of local directory.
!mkdir    Make directory on the local machine.
!pwd    Print working directory on local machine.
!rmdir    Remove directory on the local machine.

Example of a ftp7 usage:

s7 ftp7 localhost 2021

Ftp7 is based on the library "ftp.s7i", which does the actual communication with the FTP server.


Start ftp7 and do some commands

 previous   up   next