Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Screenshots Panic Mandelbr Planets Comanche Calc7 Savehd7 Compiler Dnafight Sudoku Wator Tar7 Sydir7 Ftp7 Castle Tetris Make7 Ftpserv Basic Pairs Shisen Eliza Toutf8 Lander Wiz Startrek Mahjong
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]

When 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

When 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. When the login succeeds it writes a prompt:


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.

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