ZXPWIN

ZXPWIN {<pcdir=>} {(ext)} <file>

(UNIX only) ZXPWIN is a handy utility for A-Shell/UNIX users running the ZTERM terminal emulator. It transfers the specified file to the PC and launches it using the Windows application appropriate for the file type (thus combining two or three steps which might otherwise be done manually.)

If the optional <pcdir=> argument is not specified, then the file is transferred to the default directory, whatever that may be. Otherwise, it is sent to the specified PC directory.

If you have ZTERM Build 143 or higher, you can use PC environment variables, such as TEMP, but enclosing them in % (e.g. ZXPWIN %TEMP%=ABC.TXT)

The optional (ext) argument may be used to force the source file extension to be changed during the transfer. This is particularly useful since the extension determines which Windows application will be launched. For example, if you wanted to transfer a BAS file to the PC and view it in Notepad, you would want to specify (TXT). Otherwise, the default application for BAS files would probably be the Visual Basic editor, which is probably not present, and even if so, is probably not what you wanted.

Since parentheses are significant to most UNIX shells, if you are going to specify a ZXPWIN command as part of an ashell command line (which will be processed by the shell), you will need to enclose the parentheses in quotes (e.g. ashell ZXPWIN %TEMP%="(TXT)"ABC.BAS)

The file argument can be in native or AMOS format.

Examples

ZXPWIN TEST.DOC

Transfer the file test.doc to the PC in the default transfer directory and launch the Windows application which is associated with DOC files (probably Word or WordPad).

ZXPWIN %TEMP%=(CSV)TEST.PRT

Similar to the previous example, except that we will send the file to the PC directory defined by the PC’s TEMP environment variable, and we will rename the file TEST.PRT to TEST.CSV on the PC (so that we launch the spreadsheet program). This would be most appropriate if the TEST.PRT file was actually in comma-delimited format.

HOST ashell ZXPWIN %TEMP%="(DOC)"TEST.BAS

The above command launches a new instance of ashell, which in turn executes the same ZXPWIN operation as in the previous example. Note that we must enclose the (DOC) argument in quotes since the shell (which will process the ashell command line) would otherwise strip off the parentheses.

ZXPWIN C:\TEMP=(TXT)/vm/miame/miame.ini

This command transfers miame.ini (note the use of the native UNIX filespec) to the C:\TEMP directory on the PC, renaming it to miame.txt, and then launching the TXT file viewer (which is probably Notepad).