$! Diff a bunch of files, dialog format: $! p1 Old dir: Enter a device:[directory] $! p2 New dir: Enter a device:[directory] $! p3 Wild spec: Enter a wild card spec. $! p4 Output log: Enter a file-spec or to write to the batch log. $! p5 Diff param: Default is "-c -b" $! $! Warning -- echo and diff must be Decus C software. $! $ was_verify = 'f$verify(0)' $ ffchar[0,32]= %X0C $ ff := "*" $ ff[0,1]:= 'ffchar' ! Form feed string $ in_1 = p1 $ in_2 = p2 $ wspec = p3 $ log = p4 $ dpar = p5 $ here := 'f$logical("SYS$DISK")''f$directory()' $ nopar = 0 $ if p1 .eqs. "" then nopar = 1 $ if f$mode() .eqs. "INTERACTIVE" then goto inquire $ if in_1 .eqs. "" then in_1 = here $ if in_2 .eqs. "" then in_2 = here $ if wspec .eqs. "" then wspec = "*.*" $ if dpar .eqs. "" then dpar = "-c" $ goto doit $ inquire: $ if p1 .eqs. "" then inquire in_1 "Enter old input dev:[dir]" $ if p2 .eqs. "" then inquire in_2 "Enter new input dev:[dir]" $ if p3 .eqs. "" then inquire wspec "Enter wild-card file spec" $ if p1 .eqs. "" then inquire log "Enter output dev:[dir] spec." $ if nopar then inquire dpar "Diff parm, for ""-bc""" $ if in_2 .eqs. "" then in_2 = here $ if dpar .eqs. "" then dpar = "-bc" $ doit: $ set noon ! Ignore errors $ write sys$error "** Ignore following error messages if any" $ close dirfile ! In case it is open $ delete direct.tmp;* ! In case it is present $ write sys$error "** Ignore previous error messages" $ set on ! Errors are real $ on control_y then goto done $ directory/versions=1/columns=1/nodate/nosize/noheading - /notrailing/output=direct.tmp 'in_1''wspec' $ if .not. $status then goto dirx $ open/read dirfile direct.tmp $! $ echo := $bin:echo $ if log .nes. "" then write sys$output "Writing diff to ''log'" $ logfile = "" $ if log .nes. "" then logfile = ">>''log'" $ if log .nes. "" then echo "" >'log' ! Create log file $! $ dodiff: $ read/end=done dirfile name $ start = 'f$locate("]", name) $ if start .eq. 'f$length(name)' then start = -1 $ start = start + 1 $ end = 'f$locate(";", name) $ if end .eq. 'f$length(name)' then end = 'f$length(name)' + 1 $ size = end - start $ name := 'f$extract(start, size, name)' $ write sys$output "''name':" $ echo "''ff'**+" """''name'""" 'logfile' $ if f$search("''in_2'''name'") .eqs. "" then goto not_present $ diff 'dpar' "''in_1'''name'" "''in_2'" 'logfile' $ goto next $ not_present: $ echo "** " """''name'"" not found in ''in_2'" 'logfile' $ next: $ set on ! Errors are real now $ echo "**-" """''name'""" 'logfile' $ goto dodiff $! $! $ done: close dirfile/error=ddel $ goto ddel $! $ dirx: write sys$output "Error reading directory: ''F$MESSAGE()'" $ ddel: delete direct.tmp;* $ if 'was_verify then set verify $ exit