# ZTXFER

> [HTML Version](ztxfer_lit.htm)

_Updated October 2016; see History_

To send from host to PC:

**ZTXFER\{/A\} host-name PC-name**

or

**ZTXFER\{/A\} host-name**

To send from PC to Host:

**ZTXFER\{/A\} host-name=PC-name**

or

**ZTXFER\{/A\} =PC-name**

ZTXFER is the A-Shell implementation of ZTERM's AMOS-to-PC file transfer routine. It can be used when transferring files to/from an A-Shell host and a connected PC that is running either ZTERM or ATE. Binary transfers are performed unless ASCII is specified with the /A switch. The following syntax can be displayed by entering ZTXFER with no arguments. See also the discussion on the [ATE environment variable](environmentvariableslist.md#ate).

Note that ZTXFER requires an FTP server, so it won't work on most Windows servers unless an FTP server has been specifically set up.

**Switches**

| **Switch** | **Effect of Switch** |
|------|------|
| /A | Forces ASCII mode. |
| /1 | Forces FTPDLX mode. |
| /2 | Default. Requests new FTP/SFTP implementation if available (faster). |
| /ATE | Raw transfer via ATE terminal channel (instead of FTP/SFTP); automatic for ATE to ATSD connections. |


**Using with ATE**

ZTXFER supports wildcards if the client is ATE. Examples:

Copy all files from current directory to PC:

.ZTXFER \*.\* C:\\VM\\MIAME\\DSK0\\111222

Copy all RUN files from PC to current directory

.ZTXFER = C:\\VM\\MIAME\\DSK0\\111222\\\*.RUN

Copy A\*.B\* from PC to BAS:

ZTXFER BAS: = C:\\VM\\MIAME\\DSK0\\111222\\A\*.B\*

ZTXFER also supports an /ATE switch to force alternative transfer protocol—i.e. using ATE terminal channel. This was already automatic for transfers between an ATE client and a Windows server, but can be forced in other situations. For example, under Unix, FTP/SFTP transfers may be blocked by some security or other obstacle, while the ATE terminal channel would work.

**See Also**

•	See [FTP Debugging](ftpdebugging.md) for tips on debugging ZTXFER FTP-based transfers.

•	[ATEAPX](ateapx_sbx.md) and [ATEGFK](ategfk_sbx.md) for alternate file transfer possibilities.

**History**

2024 January, A-Shell 7.0.1753:  ZTXFER.LIT 1.4(110): /2 mode (FTP vs FTPDLX) is now the default. To force FTPDLX mode, a new /1 switch has been added

2019 June, A-Shell 6.5.1662:  DIR.LIT 1.4(109) has been updated to accommodate a change in maximum filename.ext size, from 10.3 to 72.8.

2016 October, A-Shell 6.3.1531:  ZTXFER.LIT 1.4(108) implements /ATE switch.

2014 March, A-Shell 1381:  ZTXFER.LIT 1.3(107) now supports filenames that exceed the 10.3 file.ext format. Also now treats server destination of "\*" or "\*.\*" as equivalent to ""—i.e. uses file.ext from PC.

2013 December, A-Shell 1370:  ZTXFER.LIT 1.3(106) now supports PC to Windows server file transfers using the AG\_GETFILEDATA protocol introduced in 6.1.1357 and vastly improved in 6.1.1370.0. PC to server file transfers are now typically 1 MB/sec, without requiring any special servers or ports. For the Unix server world, it also supports a new /2 switch to invoke the new FTP/SFTP protocol (implemented in [ASHNET](ashnet.md) 1.6.139) if it is available.