Happy Friday Bigfixers,
Would someone be so kind as to point me in the right direction for an analysis where I’d like to retrieve the sum of two different sets of folders, add them together and aforementioned analysis provides the result.
if exists (folder "c:\users\all users\fireeye") then ((if (0<(it / (1024*1024*1024*1024))) then (it / (1024*1024*1024*1024)) as string & "TB" else if (0<(it / (1024*1024*1024))) then (it / (1024*1024*1024)) as string & "GB" else if (0<(it / (1024*1024))) then (it / (1024*1024)) as string & "MB" else if (0<(it / (1024))) then (it / (1024)) as string & "KB" else (it as string & "B")) of (sum of sizes of descendants of folder "c:\users\all users\fireeye")) else ERROR "All Users\Fireeye dir not found"
“+”
if exists (folder "c:\programdata\fireeye") then ((if (0<(it / (1024*1024*1024*1024))) then (it / (1024*1024*1024*1024)) as string & "TB" else if (0<(it / (1024*1024*1024))) then (it / (1024*1024*1024)) as string & "GB" else if (0<(it / (1024*1024))) then (it / (1024*1024)) as string & "MB" else if (0<(it / (1024))) then (it / (1024)) as string & "KB" else (it as string & "B")) of (sum of sizes of descendants of folder "c:\programdata\fireeye")) else ERROR "FirEeye dir not found"
= Some number much higher than it should be if it were working properly.
Thanks very much!