Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Geting Directory Size

$
0
0

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:\windows\temp -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,

Thanks,

MM PP


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images