/* $VER: CheckDir.vzrx 1.01 (30.9.95) © 1995 by Georg Hörmann Template: CheckDir.vzrx DIR/A,QUIT/S DIR: Must be a valid path. 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). */ Prog_VirusZ = "dh0:VZ" /* You may change this */ options results options failat 99 UseQuitFlag = "no" parse upper arg DirToCheck QuitFlag if DirToCheck = "" then do say "No directory specified." 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 address VIRUSZ_II.REXX CHECKDIR DirToCheck DECREXEC DECRDATA if rc=0 then say "Directory is clean." if rc=5 then say "Directory contains virus!" if rc=10 then say "Error checking directory!" if UseQuitFlag = "yes" then do if QuitFlag = "QUIT" then do say "Quitting VirusZ..." address VIRUSZ_II.REXX QUIT end end