5/20/2023 0 Comments Disk folder size![]() GCI C:\source -recurse | Group-Object -Property Directory | The command and a brief explanation follows. Still, it was pretty interesting to hack it together. ![]() As I mentioned previously, this won’t automatically add the size of each sub-folder to the parent folder (so in the results you’d get C:\Source as 10 KB and C:\Source\Sub as 100 MB, for example). ![]() So I had a bit of a tinker as an intellectual exercise and I worked up a one-liner that works. I mentioned in the last part that you should be able to get the sizes of sub-folders within a folder with Measure-Object and Group-Object.
0 Comments
Leave a Reply. |