- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DCL - DELETE
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 02:08 PM
тАО07-26-2007 02:08 PM
I need to delete the directory in batch mode but the target directory contains many sub-directories & files.
Do anyone know the effective ways to do in DCL?
Thanks
Sentosa
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 02:52 PM
тАО07-26-2007 02:52 PM
Re: DCL - DELETE
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1101875
It has several ways.
If you really want to delete everything in the directory, the fastest way is the DFU utility. But you will need to install that.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 03:25 PM
тАО07-26-2007 03:25 PM
SolutionThere are at least two ways of doing this. The first, albeit not the most aesthetically pleasing way is to issue the DELETE [DIRECTORY_NAME...]*.*;* command repeatedly until you get the error (in $STATUS) indicating that there were no files. The highest level directory can then be deleted explicitly.
A somewhat more appealing solution is to use the F$SEARCH lexical to identify all of the data files to walk the subdirectory tree, deleting each subdirectory in turn.
The first method is very easy to do, the second requires more coding.
In both cases, I strongly recommend extensive testing (preferably in a safe environment from a non-privileged, non-system UIC) to avoid the possibility of accidents.
I hope that the above is helpful.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 04:51 PM
тАО07-26-2007 04:51 PM
Re: DCL - DELETE
DELETE has a design flaw when deleting anything more than a few files in a single directory. It does everything backwards. First, directories are deleted top down, which is analogous to attempting to demolish a building from the ground floor upwards. Second, files within directories are deleted in A to Z order, which is the most pessimal case for the way directories are organised, and how deletions are managed. They really should be done Z-A.
If you're on ODS-2 (limited directory depth) and don't mind extraneous error messages, try:
$ set protection=(w:d) [yourdir...]*.dir
$ delete [yourdir...]*.*;*,;*,;*,;*,;*,;*,;*,;*,;*,;*,;*,;*
$ set protection=(w:d) yourdir.dir
$ delete yourdir.dir;
but this may take a very long time if there are many files.
The best solution for deleting entire directories is definitely DFU.
There's some further discussion at:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=625667
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 06:34 PM
тАО07-26-2007 06:34 PM
Re: DCL - DELETE
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 06:39 PM
тАО07-26-2007 06:39 PM