File and Folder Count Posted on February 22, 2021 by Evan Schmitke in Uncategorized Using Powershell Get-ChildItem d:\scripts -Directory -Recurse| ForEach-Object{ [pscustomobject]@{ FullName = $_.Fullname FileCount = $_.GetFiles().Count } } | Out-File -FilePatch c:\temp\filename.txt