$limit = (Get-Date).AddDays(-100)
$path = "C:\Windows\System32\LogFiles\HTTPERR"

# Delete files older than the $limit.
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force
