Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hao!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!cfchiesa From: cfchiesa@bsu-cs.UUCP (Sir Xetwnk) Newsgroups: comp.os.vms Subject: Re: recursive deletion Message-ID: <2202@bsu-cs.UUCP> Date: 24 Feb 88 16:18:01 GMT References: <567004@mail.uwa.oz> Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 35 Summary: One command In article <567004@mail.uwa.oz>, j_smartt@mail.uwa.oz writes: > > > > > > G'day!, > 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? > > Thanks, > Jeff. Jeff, You should be able to do that in DCL with the following commands: $ SET DEFAULT directory_spec ! If you're not there already $ SET PROTECTION [...]*.*;* ! If you don't already have Delete access $ DELETE [...]*.*;* ! May not delete non-empty .DIRs on frst pass, but then again maybe it will. It occurs to me that this may not be sufficient if you have more than one level of subdirectories to deal with; I haven't gotten that deep, myself. I would think it would depend on whether or not VMS knows to delete what's IN a subdirectory BEFORE trying to delete the subdirectory itself. Anyone who knows for sure, will doubtless post - I just felt that if the above turns out to work, it's probably the shortest way at it. Chris Chiesa -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Chris Chiesa <><><><><> <> {ihpn4|seismo}!{iuvax|pur-ee}!bsu-cs!cfchiesa <> <> cfchiesa@bsu-cs.UUCP <> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>