$! SUBDIRSIZE.COM $! 23-JUL-1997, David Mathog, Biology Division, Caltech $! $! Script for finding out how big each of the subdirectories $! are for a given directory = P1. If P1 is not specified it defaults $! to the current default. $! $ on error then exit $ if(P1 .nes. "") $ then $ here = P1 $ else $ here = f$environment("DEFAULT") $ endif $ write sys$output "Subdirectory sizes below ''here'" $ there = here - "]" $ on error then continue $! $ count = 0 $top: $ file = f$search("''here'*.dir") $ if(file .eqs. "")then goto done $ count = count + 1 $ part = f$parse(file,,,"NAME") $ write sys$output "Size of [.''part']" $ dir/size=all/grand 'there'.'part'...]*.*.* $ goto top $ done: $ if (count .eq. 0) $ then $ write sys$Output "There were zero subdirectories" $ else $ write sys$Output "There were ''count' subdirectories" $ endif