Powershell Get-ChildItem progress question Powershell Get-ChildItem progress question powershell powershell

Powershell Get-ChildItem progress question


Something like this?

get-childitem -recurse -filter *.exe |       %{Write-Host Examining file: $_.fullname; $_} |       measure-object -Property length -Average


A little more detailed progress:

$images = get-childitem  -recurse -filter *.jpeg$images | % -begin { $i=0 } `-process {  write-progress -activity "Computing average..." -status "Examining File: $image.fullpath ($i of $($images.count))" -percentcomplete ($i/$images.count*100); $i+=1 } `-end { write-output "Average file size is: $($images | measure-object -Property length -Average)" }