Please enable JavaScript to view this site.

ZTERM

This escape sequence handles single, multiple and wildcard transfers using the FTP server running on the host that ZTERM is connected to.

Parameter

Value or Description

Lead in

CHR$(27) CHR$(1) CHR$(127)

Direction flag

"0" for host to PC (binary mode)

"1" for PC to host (binary mode)

"2" for host to PC (ASCII mode)

"3" for PC to host (ASCII mode)

Host directory

followed with CHR$(0)

Host file name

followed with CHR$(0)

PC file name

followed with CHR$(0)

Termination

CR

 

This escape sequence accepts embedded environment variables for the PC file name.

Examples

This transfers the host file "DSK0:[1,4]AMOS32.MON" to the local PC file "C:\TEMP\AMOS.MON":

PRINT CHR$(27);CHR$(1);CHR$(127);

PRINT "0";

PRINT "SYS:";CHR$(0);

PRINT "AMOS32.MON";CHR$(0);

PRINT "C:\TEMP\AMOS.MON";CHR$(0);

INPUT "";A$        ! wait for ZTERM to finish

 

This example transfers the ASCII PC file "C:\OUTPUT.LST" to the host file "/users/output.ls":

PRINT CHR$(27);CHR$(1);CHR$(127);

PRINT "3";

PRINT "/users";CHR$(0);

PRINT "output.ls";CHR$(0);

PRINT "C:\OUTPUT.LST";CHR$(0);

INPUT "";A$        ! wait for ZTERM to finish

 

You can also use wildcards with this escape sequence. For example, this escape sequence transfers all the executables from SYS: that start with an 'S':

PRINT CHR$(27);CHR$(1);CHR$(127);

PRINT "0";

PRINT "SYS:";CHR$(0);

PRINT "S*.LIT";CHR$(0);

PRINT "c:\temp";CHR$(0);

INPUT "";A$        ! wait for ZTERM to finish

 

And the following escape sequence will transfer them back to DSK0:[123,123]:

PRINT CHR$(27);CHR$(1);CHR$(127);

PRINT "0";

PRINT "DSK0:[123,123]";CHR$(0);

PRINT CHR$(0); ! same file names on host

PRINT "c:\temp\s*.lit";CHR$(0);

INPUT "";A$        ! wait for ZTERM to finish

 

If the host is an AMOS box with AlphaTCP, make sure it's running AlphaTCP 1.3b or later and that the FTP is server is configured for "Unix" and "Overwrite" modes. The AlphaTCP Administrators Guide describes how to do this.

The file is always transferred from the same server running the telnet connection.