I have 338 user shares

using this code, to build a database/ini file

code:

break on cls

$path = "d:\users"
$tempfile = "%temp%\temp.dat"
$database = "d:\diruse.ini"

if exist($database) = 0
$nul = open(1,$database,5)
$nul = close(1)
endif

? "Building $Database"
$return = dir("$path\*.*")
while @error = 0
select
case $return = "." or $return = ".."
;ignore
case (getfileattr("$path\$return") & 16) = 16
; $return will equal a dir or a file,
; depending on how $dirfileflag was set
shell '%comspec% /c diruse /m "$path\$return" | find /i " total:" > $tempfile'
$nul = open(1,$tempfile,2) $data = readline(1) $nul = close(1)
$foldersize = ltrim(substr($data,1,13))
$nul = writeprofilestring("$database","DIRUSE","$return","$foldersize") "."
endselect
$return = dir()
loop


It took a total of 00:01:50.765 to run.

Bryce