File and Folder Count

Using Powershell

Get-ChildItem d:\scripts -Directory -Recurse|
	ForEach-Object{
		[pscustomobject]@{
			FullName  = $_.Fullname
			FileCount = $_.GetFiles().Count
		}
	} | Out-File -FilePatch c:\temp\filename.txt

No Comments Yet.

Leave a Comment