Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site Glacier.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!oliveb!Glacier!info-vax@sri-kl From: info-vax@sri-kl Newsgroups: fa.info-vax Subject: Yet another tree killer Message-ID: <271@Glacier.ARPA> Date: Wed, 30-Oct-85 23:50:33 EST Article-I.D.: Glacier.271 Posted: Wed Oct 30 23:50:33 1985 Date-Received: Sat, 2-Nov-85 05:17:27 EST Sender: daemon@Glacier.ARPA Organization: Stanford University, IC Laboratory Lines: 27 From: John LloydThe 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