From: WILLIAM WEBB [WWEBB1@email.usps.gov] Sent: Tuesday, February 26, 2002 11:43 AM To: Info-VAX@Mvb.Saic.Com Subject: RE: tool to calc recursive dir sises ? I reiterate my position. (Here's the TREE.COM I remembered - it's old as the hills. It will give you an ANSI graphical directory tree.) It can walk the directory tree of a disk but unless you modify it (which I'm sure you will), you'll have to set default to the MFD for it to behave properly. $ ESC[0,7] = 155 $ Gr_On = ESC + "(0" $ Gr_Off = ESC + "(B" $ Tab = " " $ $ IF P1 .EQS. "" $ THEN $ out = "WRITE SYS$OUTPUT" $ ELSE $ OPEN/WRITE in 'P1' $ out = "WRITE in" $ ENDIF $ $ out ESC + "[2J" $ out ESC + "[1;1f" $ $ Begin_Directory = F$DIRECTORY() $ Pad = "tqq" $ $ OUT Tab + Begin_Directory $ CALL Get_Directories 'Pad' $ SET DEFAULT 'Begin_Directory' $ IF P1 .NES. "" THEN CLOSE in $ $Get_Directories: SUBROUTINE $ Directory_Loop: $ Dirct = F$search("*.dir") $ IF F$LOCATE("000000.000000",Dirct) .LT. F$LENGTH(Dirct) THEN Exit $ IF Dirct .EQS. "" $ THEN $ EXIT $ ELSE $ Out_Dirct = F$EXTRACT(F$LOCATE("]",Dirct)+1,- F$LENGTH(Dirct),- Dirct)- - ".DIR;1" $ OUT Tab + Gr_On + Pad + Gr_Off + Out_Dirct $ New_Direct = F$EXTRACT(0,F$LOCATE("]",Dirct),Dirct)- + "." + F$EXTRACT(0,F$LENGTH(Out_Dirct),Out_Dirct)- + "]" $ SET DEFAULT 'New_Direct' $ Pad = "x " + Pad $ CALL Get_Directories 'Pad' $ Pad = F$EXTRACT(3,F$LENGTH(Pad),Pad) $ GOTO Directory_Loop $ ENDIF $ $ENDSUBROUTINE $ That's gonna be some busy DCL- If it was electrical, the lights would probably dim. :^) And I really think you do want to do a DIR/SIZ/TOT/GRAND disk[dir_where_you_are...] at each .DIR you hit because you'll have less output to parse. $ dir/siz/grand/tot sys$sysdevice:[sys1...]*.*;* Grand total of 248 directories, 13402 files, 2582835 blocks. WWWebb -----Original Message----- From: Info-VAX-Request@Mvb.Saic.Com at INTERNET Sent: Tuesday, February 26, 2002 9:53 AM To: Webb, William W Raleigh, NC; Info-VAX@Mvb.Saic.Com at INTERNET Subject: RE: tool to calc recursive dir sises ? Actualy more or less as a DIR/TOT, *BUT* the total for each dir should include the file(s) in any subdir(s) to that directory. I'd like to find the largest directory (incl any subdirs) on the [000000] level and then "drill-down" from that to find the actual sub-sub-dir where all the files are. Jan-Erik. WILLIAM WEBB wrote: > > I'd have responded to your inquiry earlier, but was (and still > am confused) about exactly how you wanted that totalling and > subtotalling to work. >