info-vax@sri-kl (10/31/85)
From: John Lloyd <jl%dac.triumf.cdn%ubc.csnet@csnet-relay.arpa> The following is a little more compact than Marty Sasaki's posting a couple of weeks ago. Note the recursive call inside: $ ! Delete directory tree JA Lloyd 83 12 16 $ if "" .nes. P1 then goto doit $ inquire P1 "What disk and subdirectory ?" $doit: $ if "" .eqs. P2 then P2 = 0 $ P2=1+P2 $ disk=f$parse(P1,"","","DEVICE") $ base=f$parse(P1,"","","DIRECTORY") $ $ subloop: $ on warning then exit 1 $ context = f$search(disk+base+"*.DIR",P2) $ if "" .eqs. context then goto delete_some $ subname = f$parse(context,"","","NAME") $ subcontext= disk + base - "]" + "." + subname + "]" $ @DISK$USER:[JAL]deltree 'subcontext 'P2 $ goto subloop $ $ delete_some: $ write sys$output "will DELETE ",disk,base,"*.*;*" $ DELETE 'DISK''BASE*.*;* $ exit 1