Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!hc!whitfill From: whitfill@hc.DSPO.GOV (Jim Whitfill) Newsgroups: comp.os.vms Subject: Re: recursive deletion Message-ID: <14197@hc.DSPO.GOV> Date: 6 Mar 88 01:33:00 GMT References: <40@tulane.tulane.edu> Organization: Los Alamos National Laboratory Lines: 28 in article <40@tulane.tulane.edu>, mb@tulane.tulane.edu (Mark Benard) says: > > 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. You can't DELETE DISK:[SMITH...*]*.*;* if there is a subdirectory in SMITH that contains files. DELETE will fail trying to delete [SMITH]X.DIR since [SMITH.X] contains files. The only way to do this is to use a recursive program that works its way to the bottom of the tree and then deletes its way back up. Programs such as this have been posted in this group. ======================================= Jim A. Whitfill Los Alamos National Laboratory (LANL) Group MEE-10, MS J580 Los Alamos, NM 87545 (505) 667-9282 (ARPAnet ==> whitfill%meediv.xnet@lanl.gov) =======================================