Get folder size in analysis

(imported topic written by Shlomi91)

Hi,

I need to collect a specific folder size from about 120 servers.

the folder is in the same location in all servers (E:\Home), so i wrote this query and tested it on one server:

q: sum of ((sum of sizes of descendants of it) /1024/1024) of folders of folder "e:\home"
A: 70181

(Yes, i know it can take a while - i am only running this once a week)

however, my problem lies in tha fact that while QnA’s answer is 70 GB, the result i get from right clicking “e:\home” under Windows explorer and clicking properties, i get over 200 GB!!!

the folder / volume is not compressed, and there are no files under e:\home, just folders.

can anyone help me understand why QnA is giving different results than Explorer?

thanks,

Shlomi

(imported comment written by Lee Wei)

Shlomi,

The way it is written, you will be missing the content in the “e:\home” root location.

Try removing the “folders of folder” as in the following:

sum of ((sum of sizes of descendants of it) /1024/1024) of folder "e:\home"

Lee Wei

(imported comment written by Shlomi91)

Hi Lee,

thanks for your answer.

As i mentioned in my post, there are no files under e:\home, just folders.

I ran your query all the same, but got the same result, 70 GB from QnA, 200 GB from explorer.

Shlomi

(imported comment written by Shlomi91)

Hi,

this is really important to me - can anyone shed some light on this?

thanks,

Shlomi

(imported comment written by SystemAdmin)

This is a bit backwards, but you could always write a task to run a “dir /s” and pipe the results to a text file. Your analysis would then just have to look for the line with “File(s)” on it.

(imported comment written by Shlomi91)

Crude, but effective… (took me over 8 minutes (!!!) as opposed to 10-15 seconds with Bigfix, but gave the “real” result…

Thanks!

(imported comment written by SystemAdmin)

Cool-- I didn’t say it was going to be pretty, but at least it is straight forward to implement. Hopefully someone responds with a better method.