- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Deletion of a directory
Operating System - OpenVMS
1820390
Members
3489
Online
109623
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО02-20-2007 01:41 AM
тАО02-20-2007 01:41 AM
How to delete a directory recursively
including subdirectories and files
in OPENVMS?
Regards
Jayakrishnan
including subdirectories and files
in OPENVMS?
Regards
Jayakrishnan
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2007 01:53 AM
тАО02-20-2007 01:53 AM
Re: Deletion of a directory
Hi Jayakrishnan,
there is no direct qualifier for recursive deletion.
You can either create your own script to examine the tree recursively, or use the wonderful DFU tool (essential requirement for all VMS system managers!):-
http://www.digiater.nl/dfu.html
This has a DELETE x.dir /DIR/TREE syntax which will do what you want.
Regards,
Duncan
there is no direct qualifier for recursive deletion.
You can either create your own script to examine the tree recursively, or use the wonderful DFU tool (essential requirement for all VMS system managers!):-
http://www.digiater.nl/dfu.html
This has a DELETE x.dir /DIR/TREE syntax which will do what you want.
Regards,
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2007 02:27 AM
тАО02-20-2007 02:27 AM
Solution
Agreed with the DFU suggestions.
You shoudl get that.
If it is just for once or twice then the workaround is:
$set prot [.test...]*.dir
$delete [.test...]*.*.*,*.*.*,*.*.*,*.*.*,*.*.*,*.*.*
It will complain about non-empty directories for the initial passes, but it will nail them all eventually :-).
Cheers,
Hein.
You shoudl get that.
If it is just for once or twice then the workaround is:
$set prot [.test...]*.dir
$delete [.test...]*.*.*,*.*.*,*.*.*,*.*.*,*.*.*,*.*.*
It will complain about non-empty directories for the initial passes, but it will nail them all eventually :-).
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2007 03:22 AM
тАО02-20-2007 03:22 AM
Re: Deletion of a directory
GNV bash rm -R
DFU -- well worth the install, not just for this, but for its many other capabilities.
There are various deltree tools and procedures around, as well.
http://www.decus.org/libcatalog/description_html/v00148.html
http://vms.tuwien.ac.at/freeware/DELTREE/
http://vms.process.com/ftp/vms-freeware/fileserv/
If you're talking about coding this into an application, a depth-first tree search using lib$find_file and lib$delete_file calls. And a trailing lib$find_file_end call, as required, to clean up. Some of the Freeware tools likely use these calls, though some may use the lower-level RMS or XQP calls.
The brute-force approach is to repeat the parameter on the DCL command DELETE (with as many or more repeats as the directory is deep), or to repeat the DELETE command.
Stephen Hoffman
HoffmanLabs
DFU -- well worth the install, not just for this, but for its many other capabilities.
There are various deltree tools and procedures around, as well.
http://www.decus.org/libcatalog/description_html/v00148.html
http://vms.tuwien.ac.at/freeware/DELTREE/
http://vms.process.com/ftp/vms-freeware/fileserv/
If you're talking about coding this into an application, a depth-first tree search using lib$find_file and lib$delete_file calls. And a trailing lib$find_file_end call, as required, to clean up. Some of the Freeware tools likely use these calls, though some may use the lower-level RMS or XQP calls.
The brute-force approach is to repeat the parameter on the DCL command DELETE (with as many or more repeats as the directory is deep), or to repeat the DELETE command.
Stephen Hoffman
HoffmanLabs
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP