Geting Directory Size

by Feb 24, 2014

Hi Guys,

I am new in Power shell. I will appreciate if somebody answer my question.

I am going to get the size of directory ( considering  subdirectories , files and folders ) . Here the command which I used:

"get-childitem -Path c:windowstemp -recurse | measure-object -property Length -sum | select-object Count, Sum"

but I think the size of directories with this command  is a little less that size of my temp folder when I click on it with mouse and see properties. Does this command consider directory size ? or it just give me size of files on "temp" folder and its subdirectories?

Does "count" just show the number of files? How can I get number of files and folders?

Sorry for my English,