/* $VER: CheckArc.vzrx 1.01 (1.10.95) © 1995 by Georg Hörmann Template: CheckArc.vzrx ARC/A,QUIT/S ARC: The filename (with path) of the archive. QUIT: If VirusZ has been started from the script, you can quit after checking by specifying this option. If VirusZ is not running, it will be started from the script (and quitted afterwards if requested). Currently the type of archive is determined by the filename suffixes ".lha", ".lzh" and ".lzx". This should usually work properly as nobody ever removes the suffixes of archive names. */ /* Filenames of external programs */ Prog_VirusZ = "dh0:VZ" Prog_LHA = "Boot:Tools/LHA" Prog_LZX = "Boot:Tools/LZX" Prog_Delete = "C:Delete" TempPath = "RAM:TempArcDir" options results options failat 99 UseQuitFlag = "no" parse upper arg ArcToCheck QuitFlag if ArcToCheck = "" then do say "No archive specified." exit end TypeFlag = index(ArcToCheck,.LHA) + index(ArcToCheck,.LZH) + index(ArcToCheck,.LZX) if TypeFlag = 0 then do say "Archive not of required type." exit end if ~show(ports,VIRUSZ_II.REXX) then do say "Starting VirusZ..." address command Prog_VirusZ UseQuitFlag = "yes" StartTime = time(seconds) do while ~show(ports,VIRUSZ_II.REXX) if time(seconds) - StartTime > 20 then do say "Error loading VirusZ!" exit end end end if exists(TempPath) then do say "Deleting temporary directory..." address command Prog_Delete ">NIL: NIL: NIL: NIL: