Path: utzoo!mnetor!uunet!wpg!tulane!mb From: mb@tulane.tulane.edu (Mark Benard) Newsgroups: comp.os.vms Subject: Re: recursive deletion Message-ID: <40@tulane.tulane.edu> Date: 5 Mar 88 11:47:04 GMT References: <567004@mail.uwa.oz> <2202@bsu-cs.UUCP> Reply-To: mb@tulane.UUCP (Mark Benard) Organization: C.S. Dept., Tulane Univ., New Orleans, LA Lines: 28 In article <2202@bsu-cs.UUCP> cfchiesa@bsu-cs.UUCP (Sir Xetwnk) writes: >In article <567004@mail.uwa.oz>, j_smartt@mail.uwa.oz writes: >> >> does anybody have a VMS/DCL procedure to simulate the UNIX >> "rm -r *.*" command - i.e. to recursively remove all files at and below >> a given directory? >> > You should be able to do that in DCL with the following commands: > >$ DELETE [...]*.*;* ! May not delete non-empty .DIRs on frst pass, > but then again maybe it will. > To fully delete a directory DISK:[SMITH] (aka DISK:[000000]SMITH.DIR) takes 3 commands $ DELETE DISK:[SMITH...*]*.*.* ! to get contents of subdirectories $ DELETE DISK:[SMITH]*.*.* ! to get contents of main directory $ DELETE DISK:[000000]SMITH.DIR which can be put in a command file as long as you do not branch on warnings which will be generated by the first command if there are no subdirectories. -- Mark Benard Department of Computer Science INTERNET: mb@TULANE.EDU Tulane University USENET: pyramid!tulane!mb New Orleans, LA 70118 BITNET: mb%TULANE.EDU@RELAY.CS.NET (or pyramid!tulane!mb at DECWRL.DEC.COM)