[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1894.0. "Zmodem made easy, please read on..." by CGFSV2::CADAMS (Clint Adams - Calgary, Canada) Mon Nov 21 1988 15:54

Hi..

What follows is a command file I put together to assist when sending
files to my Amiga using the VMS version of Zmodem (SZ.EXE). It makes
batch transfers a breeze and will make it easy to resume the batch
transfer should it be interrupted. Also, after a little
experimentation, I have found that Zmodem does not seem to care if
the file is in Stream_LF or Fixed. Zoo's and Arc's both come down fine
either way (let me know if anyone finds this not the case and I will
have the command file do the conversion automatically).

Hopefully, this can make the dowloading process a little easier and
faster for some of you out there.

                Regards....   Clint

$!
$!      SZ_SEND.COM
$!      November 16th, 1988
$!      Clint Adams (CGOU01::ADAMS)
$!
$!      This little command file will let you give VMS Zmodem (aka SZ)
$!      a standard VMS filespec for batch transfers. Define a symbol
$!      like send:==@"this command file" and then type
$!              $ send "filespec"
$!      it will then build a command file with syntax that SZ.EXE 
$!      can deal with. 
$!
$!      If you typed 
$!              $ send [stuff]*.arc,*.zoo
$!      it will select all the .arc's and .zoo's in the directory [stuff]
$!      and build a command file to execute the the transfer.
$!
$!      Just typing 
$!              $ send 
$!      will select all the files in the current directory.
$!
$!      File specs are limited to only one directory at a time.
$!      The symbol "sz" used by this procedure can be define by
$!                      $ SZ:==$device:[directory]SZ.EXE
$!
$!      I threw the the "r" switch in to take care of restarts and such.
$!
$ on error then goto error
$ on control_y then goto error
$ on control_c then goto error
$ size=0
$ hours=0
$ minutes=0
$ hours1=0
$ minutes1=0
$ if f$type(sz) .eqs. "" then goto nosz
$ define temp sys$login:
$ dir:=dir/notrail/nohead
$ dir/out=temp:send.temp 'p1
$ write sys$output ""
$ write sys$output "Sending the following files with Zmodem.... "
$ write sys$output ""
$ open senddata temp:send.temp
$ open/write outtocom temp:doit.com
$ write outtocom "$ sz -kr-"
$loop:
$ read/end_of_file=doit senddata file
$ name=f$parse(file,,,"name")
$ type=f$parse(file,,,"type")
$ dir=f$parse(file,,,"directory")
$ size=size+f$file_attributes(file,"eof")
$ write outtocom " " + name + type + "-"
$ write sys$output dir + name + type
$ goto loop
$doit:
$ write sys$output ""
$ write outtocom ""
$ write outtocom "$"
$ write outtocom "$exit"
$ close outtocom
$ if size .eq. 0 then goto nofile
$ timetotran=(size*512)/(113*60)
$ hours=timetotran/60
$ minutes=timetotran-(hours*60)
$ curtime=f$time()
$ comptime=f$cvtime("''curtime+''hours':''minutes':00.00","absolute")
$ timetotran2=timetotran/2
$ hours1=timetotran2/60
$ minutes1=timetotran2-(hours1*60)
$ curtime1=f$time()
$ comptime1=f$cvtime("''curtime1+''hours1':''minutes1':00.00","absolute")
$ bytes=(size*512)
$ write sys$output ""
$ write sys$output "Total Bytes ''bytes'           Current Time ''curtime'"
$ write sys$output "''hours' Hrs and ''minutes' Min at 1200 Baud.    Completes at ''comptime'"
$ write sys$output "''hours1' Hrs and ''minutes1' Min at 2400 Baud.    Completes at ''comptime1'"
$ write sys$output ""
$ curdir=f$directory()
$ set def 'dir
$ if p2 .eqs. "" then @temp:doit.com
$ set def 'curdir
$ if f$logical("senddata") .nes. "" then close senddata
$ if f$logical("outtocom") .nes. "" then close outtocom
$ delete temp:doit.com;*,send.temp;*
$ deassign temp
$ exit
$nofile:
$ write sys$output ""
$ write sys$output "No files could be found to match your file specification..."
$ write sys$output ""
$ if f$logical("senddata") .nes. "" then close senddata
$ if f$logical("outtocom") .nes. "" then close outtocom
$ delete temp:doit.com;*,send.temp;*
$ deassign temp
$ exit
$nosz:
$ write sys$output "The symbol SZ is not defined. Please define the symbol with the"
$ write sys$output "command:"
$ write sys$output "                    $ sz:==$device:[directory]SZ.EXE"
$ write sys$output ""
$error:
$ set noon
$ if f$logical("senddata") .nes. "" then close senddata
$ if f$logical("outtocom") .nes. "" then close outtocom
$ delete temp:doit.com;*,send.temp;*
$ deassign temp
$ exit
T.RTitleUserPersonal
Name
DateLines