@manhng

Welcome to my blog!

Folder Discovery

March 22, 2022 17:25

Folder Discovery (edit)

dir /a/s

$FolderList
= Get-ChildItem -Directory foreach ($folder in $FolderList) { set-location $folder.FullName $size = Get-ChildItem -Recurse | Measure-Object -Sum Length $info = $folder.FullName + " FileCount: " + $size.Count.ToString() + " Size: " + [math]::Round(($size.Sum / 1GB),4).ToString() + " GB" write-host $info }

Categories

Recent posts