HP OpenVMS Systemsask the wizard |
The Question is: What command(s) can I use the display/print the Open VMS DIR's, in a MS-DOS "TREE" type format? The Answer is :
MS-DOS? Tree? When posing questions, please provide a description
of what you want to do -- while commands or tools from other platforms
might be a useful adjunct to a description, their value depends greatly
on the familiarity of the audience with the other platform.
There are various tools that provide various formats for listings
of directories available from the Compaq User's Groups and from
various customer websites (eg: SWING, DM, XTREE, ZTREE), and DCL
itself can be easily and simply coaxed into meeting most of these
directory formatting requests (see below).
With DECwindows, you can use the provided FileView tool.
$! TREE.COM -- tr*ee :== @[your.favorite.directory]tree
$! Prints indented listing of up to ? levels of directories from current
$ say = "write sys$output "
$ tab = "| "
$ rs = f$directory()
$ say "Root directory: " + rs
$ rd1 = rs+"*.dir"
$!
$next_d1:
$ tc = 1
$ goto pl
$!
$next_d2:
$ tc = 2
$ goto pl
$!
$next_d3:
$ tc = 3
$ goto pl
$!
$next_d4:
$ tc = 4
$ goto pl
$!
$next_d5:
$ tc = 5
$ goto pl
$!
$next_d6:
$ tc = 6
$ goto pl
$!
$next_d7:
$ tc = 7
$ goto pl
$!
$next_d8:
$ goto next_d7
$!
$next_d0:
$ exit
$ pl:
$ fn = f$search(rd'f$string(tc),tc)
$ if fn .eqs. "" then goto next_d'f$string(tc-1)
$ px = tab
$ tt = tc
$ pl1:
$ if tt .le. 1 then goto pl2
$ tt = tt - 1
$ px = px + tab
$ goto pl1
$ pl2:
$ fs = f$parse(fn,,,"NAME")
$ say px + fs
$ tr = f$parse(fn,,,"DIRECTORY")
$ rd'f$string(tc+1) = f$extract(0,f$locate("]",tr),tr)+"."+fs+"]*.dir"
$ goto next_d'f$string(tc+1)
|