$ErrorActionPreference = 'SilentlyContinue'
$source = 'C:\Users\Public\Desktop\Datto Workplace Server Projects\Quality Department'
$files = Get-ChildItem -LiteralPath $source -Recurse -File
$big = @($files | Where-Object { $_.Length -ge 4MB })
$bytes = ($files | Measure-Object Length -Sum).Sum
$manifest = $files | ForEach-Object { $_.FullName.Substring($source.Length + 1).Replace('\','/') + '|' + $_.Length }
$manifest | Out-File -FilePath 'C:\Windows\Temp\quality-manifest.txt' -Encoding UTF8
Write-Host "COUNT=$($files.Count)"
Write-Host "BIG4MB=$($big.Count)"
Write-Host "BYTES=$bytes"
Write-Host "MANIFEST_LINES=$($manifest.Count)"
Write-Host "MANIFEST_PATH=C:\Windows\Temp\quality-manifest.txt"
