🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by info-vax Thu, 31 Oct 1985 04:50
Yet another tree killer
#210
Author: info-vax
Date: Thu, 31 Oct 1985 04:50
27 lines
1425 bytes
From: John Lloyd <jl%dac.triumf.cdn%ubc.csnet@csnet-relay.arpa>

The following is a little more compact than Marty Sasaki's posting a
couple of weeks ago.  Note the recursive call inside:

$ ! Delete directory tree  JA Lloyd 83 12 16
$    if "" .nes. P1 then goto doit
$    inquire P1 "What disk and subdirectory ?"
$doit:
$    if "" .eqs. P2 then P2 = 0
$    P2=1+P2
$    disk=f$parse(P1,"","","DEVICE")
$    base=f$parse(P1,"","","DIRECTORY")
$
$ subloop:
$    on warning then exit 1
$    context = f$search(disk+base+"*.DIR",P2) 
$    if "" .eqs. context then goto delete_some
$    subname   = f$parse(context,"","","NAME")
$    subcontext= disk + base - "]" + "." + subname + "]"
$    @DISK$USER:[JAL]deltree 'subcontext 'P2
$ goto subloop
$
$ delete_some:
$    write sys$output "will DELETE ",disk,base,"*.*;*"
$    DELETE 'DISK''BASE*.*;*
$    exit 1
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads