Graham
JavaExperts This script assumes that all that is in /main is subfolders and a index file
and all the sub folders just contain the files being counted and a index file
if the sub folders do not contain a index file change the maths to
var $total=($total+$subc)
beware of timeouts on very large main folders and sub folders