DELTREE This utility will delete the specified directory tree (i.e., all files and subdirectories in the specified directory and then delete the directory itself.) Requirements: VMS operating system Optional: VAX BASIC V3.x - Only if you wish to modify or rebuild. The executable on this distribution was built under VMS V5.5.2 using VAX BASIC V3.5. Files included in this distribution: AAAREADME.TXT - This file DELTREE.ALPHA_EXE - VESTed executable image Alpha DELTREE.BAS - Source code DELTREE.CLD - Command language definition file DELTREE.EXE - The executable image DELTREE.MMS - MMS makefile DELTREE.COM - Build procedure for those that don't have MMS DELTREE.OBJ - Object from DELTREE.BAS DELTREECLD.OBJ - Object from DELTREE.CLD Build instructions: $ basic deltree $ set command/object=deltreecld deltree $ link/notrace deltree,deltreecld $ deltree == "$disk:[directory]deltree" The command: $ deltree [foo.bar.tmp] Will delete everything in [foo.bar.tmp] up to and including [foo.bar]tmp.dir itself. This assumes you are executing the command from an account with enough privileges to delete all the files and directories or that you have set the protection on the files so that you can delete them. The /LOG qualifier when present will cause deltree to print progress messages to sys$output. For example: $ deltree/log user:[foo.x] %DELTREE-I-FILEDEL, USER:[FOO.X]TEST.TXT;1 deleted (1 block) %DELTREE-I-FILEDEL, USER:[FOO.X.Y]Z.DIR;1 deleted (1 block) %DELTREE-I-FILEDEL, USER:[FOO.X]Y.DIR;1 deleted (1 block) %DELTREE-I-FILEDEL, USER:[FOO]X.DIR;1 deleted (1 block) %DELTREE-I-TOTAL, 4 files deleted (4 blocks) Of course you will to have delete access to all the files and directories that you intend to delete or else run it with sufficient privileges. I wrote this utility to correct a couple of bugs and to enhance the logging and error messaging of a similar utility. Differences include: o Fixed bug that caused an access violation. This only occured when deleting a file that had an extension that started with DIR but was longer than 3 characters. Such as PHONE.DIRECTORY. This bug also showed up when trying to delete a subdirectory whose file name started with the letters DIR. o Fixed bug that said a file was deleted even when it wasn't when using the /LOG qualifier. o Invoked as a foriegn command. No more abbreviation conflicts with the DCL DELETE command! o /LOG qualifier logs each file deleted and not just the last one. o Log messages include the file size in blocks. o Total files and blocks deleted is reported when /LOG is used. o Greatly enhanced the error messaging in general. Michael W. Wheeler (Internet: mww@tntech.edu) VMS Systems Support D.W. Mattson Computer Center Tennessee Technological University Box 5071 Cookeville, TN 38505 Phone: 615-372-3977 FAX: 615-372-6172