Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Reviewed and revised December 2023

tab(-10, AG_FTP); dirflag; hostpath; "~"; localpath; {"~"; options;} chr(127);     Tab(-10,x) Syntax Notes

AG_FTP (22) may be used on server installation of A-Shell to cause the ATE client to initiate a file transfer with the server.

Parameters

dirflag

A single character indicating the file transfer type and direction, from the following choices:

Value

Direction

Type

Feedback

0

Host to PC

Binary

message/dialog

1

PC to host

2

Host to PC

ASCII

3

PC to host

A

Host to PC

Binary

silent

B

PC to host

C

Host to PC

ASCII

D

PC to host

 

Codes A though D are not ZTERM-compatible, so should only be used when you know the client is ATE. Note that with ATE, the message/dialog is hardly noticeable (unlike with ZTERM, where it looks just like the standard interactive FTP dialog), so the silent feature isn't that much of an improvement. Still, some people prefer to have their file transfers be invisible to the user.

hostpath

Native specification for the file on the server. If sending to the server, this may specify just the directory, in which case the filename will be taken from the localpath.

localpath

Native (PC) specification of the source file. When transferring to the PC, this may be just a directory, in which case the filename is taken from hostpath.

options

Optional flags affecting the transfer protocol, expressed as a decimal value representing the sum of options taken from the table of FTPDLX opcodes. The most likely flag to be used here is XFTPF_VERSION2 (4096), to request use of the newer FTP2 implementation of the client side of the transfer.

Response

A single byte will be placed in the keyboard buffer to indicate success (ASCII 13, aka RETURN) or failure (ASCII 3, aka Control-C).

u Examples

 

u Comments

 

Alternatives

To transfer files to or from a machine other than the A-Shell server or the ATE client, you should use FTPDLX or FTP2 directly, as they allow specification of an arbitrary remote server address and credentials.

To transfer files between two arbitrary machines both running A-Shell, but without relying on any external file transfer services, you can implement your own file transfer protocol using TCPX. The sample program TCPXFR in EXLIB:[908,25] provides a working example of such a protocol, complete with interactive and command line server and client interfaces.

It is also possible to transfer files in both directions between the A-Shell server and the ATE client over the terminal connection using the xcalls ATEAPX and ATEGFK.

 

u Debugging

 

See Also

FTP2

 

u History