home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
pibterm
/
pibt41e3.zip
/
RECZMOD.SCR
< prev
next >
Wrap
Text File
|
1988-02-26
|
4KB
|
91 lines
***************************************************************************
* R E C Z M O D . S C R --- Script interfacing DSZ to PibTerm *
***************************************************************************
* *
* Script: RecZMod.Scr *
* *
* Purpose: Interfaces external Zmodem driver program DSZ.COM *
* to PibTerm for receiving files. *
* *
* Invocation: *
* *
* Execute "RecZmod" *
* *
* Remarks: *
* *
* This script is designed to be automatically invoked by the *
* <ALT>R command when Zmodem has been defined as an external *
* protocol at <ALT>P, F)ile transfer, k) external file transfers. *
* *
***************************************************************************
* *
* Baud rate for transfer
Declare BaudRate String
* Comm port number
Declare Port String
* Build DSZ invocation line in this
Declare Zmodem String
* Saves drive/directory we're in now
Declare CurDrive String
Declare CurDir String
* Download directory
Declare DownDir String
* Length of download directory
Declare L Integer
* Host mode flag
Declare HostMode String
* "Restrict" for host mode, else null
Declare Restrict String
* Get directory we're in now
GetDir CurDrive CurDir
* Get port number
GetParam 'PO' Port
* Get baud rate
GetParam 'BA' BaudRate
* Find out if we're in host mode
*
GetParam 'HP' HostMode
* Get download directory.
* If in host mode, use host mode upload
* directory.
*
Set Restrict = ''
*
IF ( HostMode = ' ' ) THEN
GetParam 'DD' DownDir
ELSE
GetParam 'HU' DownDir
IF ( HostMode = 'N' ) THEN
Set Restrict = 'restrict '
ENDIF
ENDIF
* Strip final '\' if any from download dir
Set L = LENGTH( DownDir )
*
IF ( Substr( DownDir, L, 1 ) = '\' ) THEN
Set DownDir = Substr( DownDir, 1, L - 1 )
ENDIF
* Move to download directory
Chdir DownDir
* Build DSZ invocation line
*
Set Zmodem = CONCAT( 'DSZ port ' , Port )
Set Zmodem = CONCAT( CONCAT( Zmodem , ' speed ' ), BaudRate )
Set Zmodem = CONCAT( CONCAT( CONCAT( Zmodem , ' d ' ), Restrict ), 'rz -y')
*
* Echo Zmodem line to screen
Writeln " "
Writeln "Invoking DSZ as follows:"
Writeln Zmodem
Writeln " "
* Echo Zmodem line to capture file
Writelog "Invoking DSZ as follows:"
Writelog Zmodem
* Call DSZ
Dos Zmodem
* Return to original directory
*
Set CurDir = CONCAT( CONCAT( CurDrive , ':\' ), CurDir )
*
Chdir CurDir