Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove a directory with sub-directory?

 
YE LIU_1
Frequent Advisor

how to remove a directory with sub-directory?

Dear VMS Users,

May I know how to remove a directory with sub-directories?

Thanks,

YE LIU
2 REPLIES 2
Hein van den Heuvel
Honored Contributor

Re: how to remove a directory with sub-directory?


Be sure to download and check out DFU: http://www.digiater.nl/dfu

It has a DELETE/DIRECTORY/TREE


Google will find you hints.

Here is my approach...

First, tehre are two problems.
1) directories must be empty to be deleted.
2) directories, by default, are protected against delete (which I disagree with, but that's how it is).

So I do this:

$SET PROT [xyz...]*.DIR ! set default which allows delete.
$DELETE [xyz...]*.*.* ! Gives warnings
repeat a few times.

You can also type $DELETE [xyz...]*.*;*,;,;,;,;,;

The ",;" are minimal file specs to post deleted the directories.

Enjoy...


Hein.



MarkOfAus
Valued Contributor

Re: how to remove a directory with sub-directory?

Hi,
Also there is deltree, which is freeware. Look on the freeware disk applicable to your OS version.
Then:

$ set default [directory tree to delete]
$ deltree []

But, of course, be warned it does what it says. Oh, you will also need the relevant privileges to delete as well (if applicable).

Cheers
Mark