Returns directory size
;Usage: $dirsize(C:\directory)
;Returns size in bytes
;Examples:
;/echo -a $dirsize($mircdir)
;Echos out the total size of the mirc directory
;/echo -a $dirsize($mircdir).dir
;If you specify .dir it will not scan deeper within other folders, so it will only return the size of the files located within the mircdir, not included the size of the other directories
alias dirsize {
var %a, %b
if ($isdir($$1-)) {
%b = $findfile($1-,*, [ $+ [ $+(0,$iif($prop,$+($chr(44),0))) ] ] ,inc %a $file($1-).size)
return %a
}
}