I need to get the size of a directory, recursively. I have to do this every month so I want to make a PowerShell script to do it.
How can I do it?
Here's quick way to get size of specific file extensions:
(gci d:\folder1 -r -force -include *.txt,*.csv | measure -sum -property Length).Sum