View Single Post
Old 05-27-2005, 05:05 AM  
Join Date: Mar 2005
Posts: 43

Just found this on

Fred Limouzin: 2005/04/11

The file size command currently (i.e. Tcl8.4.9) does not support
directories. A pure-Tcl solution involves adding recursively the size of
files in the current and in sub-directories.

Here's a Tk/GUI script that I wrote this week-end, which fits my
need. I wanted a gradient-color indication for the size of directories.
You can position the orange/yellow scale (size at which the color
indicator is orange/yellow; below that value the indicator is gradient
going toward green (size=0)) and the red scale (size from which the
indicator is red!). A scale selector also lets you decide how many
levels of sub-directories to display.
Get source code for directory size.

There is also a link on that page to source code from the UNIX du (disk usage) TCL implementation.

So, as I understand it, it's actually really not possible to get the size
all at once. You have to recursively read the size from all files??
Or maybe I don't fully understand yet what I have found above....

djdeluxe76 is offline